Date: Fri, 12 Apr 1996 16:35:38 -0600 From: Nate Williams <nate@sri.MT.net> To: hackers@freebsd.org Cc: A JOSEPH KOSHY <koshy@india.hp.com>, Gary Kline <kline@tera.com> Subject: STDIO resoltion (was Re: Critical stdio bug?) Message-ID: <199604122235.QAA08405@rocky.sri.MT.net> In-Reply-To: <199604120837.AA276558230@fakir.india.hp.com> References: <199604120530.XAA06324@rocky.sri.MT.net> <199604120837.AA276558230@fakir.india.hp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Basically, the answer to the problem came from Sean Fagan. "<4BSD stdio> has historically had a sticky EOF bit." Chris Torek writes: > More accurately, 4BSD has had this, while System V has not. Someone > (I forget who) once claimed that this solved some kind of otherwise > unsolveable problem, but could not tell me what that was. I *do* > remember that the old vax PCC required two ^Ds to make it quit, > because it did not use stdio, or something like that; and that was > kind of annoying. > > When I wrote my new stdio, I set things up so that one source line > controls whether EOF is `sticky' (in refill.c, I think). To clear the EOF, you must use the function clearerr(), which exists on all of the OS's I have acess to. It also appears that one could change the default behavior as described by "A. JOSEPH KOSHY" in a previous article. Thanks to everyone who explained this to me, especially SEF and Chris! Nate
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199604122235.QAA08405>