From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/13843 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: "Laurent Bercot" Newsgroups: gmane.linux.lib.musl.general Subject: Re: fgets() doesn't call fsync() before getting input Date: Thu, 21 Feb 2019 19:24:57 +0000 Message-ID: References: <20190221152243.GF23599@brightrain.aerifal.cx> <5c1de98e-9606-81d6-0e69-8f3dbb916065@adelielinux.org> <20190221170748.GI23599@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="58463"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: eM_Client/7.2.33939.0 To: musl@lists.openwall.com Original-X-From: musl-return-13859-gllmg-musl=m.gmane.org@lists.openwall.com Thu Feb 21 20:25:00 2019 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.89) (envelope-from ) id 1gwtxs-000F3t-DR for gllmg-musl@m.gmane.org; Thu, 21 Feb 2019 20:25:00 +0100 Original-Received: (qmail 26393 invoked by uid 550); 21 Feb 2019 19:24:58 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 26372 invoked from network); 21 Feb 2019 19:24:57 -0000 In-Reply-To: <20190221170748.GI23599@brightrain.aerifal.cx> X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedutddrtdekgdduvdegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecupfgfoffgtffkveetuefngfdpqfgfvfenuceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkjghfrhgfgggtgfesthhqredttderjeenucfhrhhomhepfdfnrghurhgvnhhtuceuvghrtghothdfuceoshhkrgdqughivghtlhhisggtsehskhgrrhhnvghtrdhorhhgqeenucfrrghrrghmpehmohguvgepshhmthhpohhuthenucevlhhushhtvghrufhiiigvpedt Xref: news.gmane.org gmane.linux.lib.musl.general:13843 Archived-At: >I think it's more of an issue for the early examples in C books and >tutorials, which invariably but inexplicably use a 1970s-era "prompt >for input" model rather than argv[] or something that would be a lot >more familiar (and amenable to testing) to modern readers. Early examples in C books and tutorials, and also in every academic C course ever. I was taught C 25 years ago with the "prompt for input" model; later, I gave advanced C classes to students who were taught the "prompt for input" model 2 years before; and nowadays every newbie C programming question that pops up in forums invariably comes with the very same thing. C courses focusing on good practices are long, long overdue. -_- -- Laurent