Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/12/84; site desint.UUCP Path: utzoo!watmath!clyde!bonnie!akgua!sdcsvax!sdcrdcf!trwrb!desint!geoff From: geoff@desint.UUCP (Geoff Kuenning) Newsgroups: net.unix-wizards Subject: Re: 4.2bsd eof flag in stdio Message-ID: <262@desint.UUCP> Date: Sun, 2-Dec-84 16:12:14 EST Article-I.D.: desint.262 Posted: Sun Dec 2 16:12:14 1984 Date-Received: Tue, 4-Dec-84 08:20:23 EST References: <5867@brl-tgr.ARPA> <1246@utah-gr.UUCP> <239@desint.UUCP> <528@cbosgd.UUCP> Organization: his home computer, Manhattan Beach, CA Lines: 27 In article <528@cbosgd.UUCP> ka@cbosgd.UUCP (Kenneth Almquist) writes: >If we may believe Bill Shannon, the whole issue arose because nobody >could figure out how to make a straightforward change to fread. Bill said quite explicitly that the change arose because they wanted to make the behavior of fread consistent. I am sure that Bill is capable of coming up with the push_back_eof algorithm all by his little old self -- if, after considering the design aspects of the situation, he decides that is the behavior he wants. If you intend to write portable software, don't assume you can continue reading from a terminal after EOF. For my money, I would much rather pay a small backwards-compatibility price to achieve a stdio implementation that was truly portable. In any case, most programs that expect to get more than one EOF from a terminal are broken, because you will get different results if you redirect from a file. Sure, there are special exceptions like slowread (aka tail -f aka tra), but let's be honest, folks -- of all the files you access in a day, how many do you access while they are growing? Normally, you make use of existing, non-growing files, and a program expecting two EOF's from a terminal will always get a null second file if it is redirected. -- Geoff Kuenning ...!ihnp4!trwrb!desint!geoff