Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site ucf-cs.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!harvard!godot!mit-eddie!genrad!decvax!mcnc!duke!ucf-cs!goldfarb From: goldfarb@ucf-cs.UUCP (Ben Goldfarb) Newsgroups: net.unix-wizards Subject: 4.2bsd eof flag in stdio Message-ID: <1697@ucf-cs.UUCP> Date: Thu, 8-Nov-84 13:24:57 EST Article-I.D.: ucf-cs.1697 Posted: Thu Nov 8 13:24:57 1984 Date-Received: Sat, 10-Nov-84 06:47:36 EST Organization: UCF, Orlando, FL Lines: 24 [] Why did Berkeley change stdio such that typing ^D (or whatever EOF character one is using) on stdin causes that stream to reflect eof until a clearerr() is done? Has this been discussed here before? If so, I apologize for further belaboring the issue. In any case, what is the correct approach to this problem? Obviously, we can't expect the authors of programs that have been distributed with UNIX since V7 to have provided for Berkeley's change; as it stands I've found that addbib and learn are both broken because of the continual EOF. So I patched if (feof(stdin)) clearerr(stdin); into both programs. I'm sure more are affected. Alternatively, I could have "fixed" stdio, but how many Berkeley programs make use of this "feature?" I'd appreciate some net wisdom on the subject. -- Ben Goldfarb University of Central Florida uucp: {duke,decvax,princeton}!ucf-cs!goldfarb ARPA: goldfarb.ucf-cs@csnet.relay csnet: goldfarb@ucf