Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!nrl-cmf!cmcl2!adm!smoke!gwyn From: gwyn@smoke.ARPA (Doug Gwyn ) Newsgroups: comp.unix.wizards Subject: Re: How can I read keyboard without stopping Message-ID: <8422@smoke.ARPA> Date: 3 Sep 88 03:04:46 GMT References: <813@ms3.UUCP> <1246@mcgill-vision.UUCP> <669@super.ORG> <679@super.ORG> <13333@mimsy.UUCP> <690@super.ORG> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 12 In article <690@super.ORG> rminnich@metropolis.UUCP (Ronald G Minnich) writes: >P.S. Does it strike anyone as strange that stdio and level 2 have such >different ideas about eof? Level 2 you can just read right through ^D; >As was pointed out, it is more like an enforced one-read FNDELAY than >anything else. for standard IO, one is enough; you lose it all right there. >The FILE * gets closed for you. If that's true, it's a bug. EOF on a stream is not supposed to close the stream, merely set the EOF indicator. In fact EOF should not be "sticky"; if more data becomes available, as on a terminal, it should be available for subsequent reading. The 4.2BSD implementation broke this but it might be okay on 4.3BSD.