Date: Fri, 3 May 1996 07:39:06 +0200 (MET DST) From: J Wunsch <j@uriah.heep.sax.de> To: freebsd-hackers@freebsd.org (FreeBSD hackers) Cc: jmacd@CS.Berkeley.EDU Subject: Re: stdio problem Message-ID: <199605030539.HAA17445@uriah.heep.sax.de> In-Reply-To: <199605022332.QAA00955@Root.COM> from David Greenman at "May 2, 96 04:32:31 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
As David Greenman wrote: > As Joerg > pointed out, mixing streams oriented file operations (which are managed by > libc) with underlying file primitives is a no-no and will result in strange > and/or undefined behavior. I do agree, however, that freopen() should work > even if the file was close()'d. It does seem as though there is an issue with > flushing the stream buffers after the file has been closed, however. I also agree with this now, i didn't get it in the first place that the problem arose by mixing low-level IO and stdio across an exec(). I think stdio should not make any particular assumptions about the initial state of the file descriptors 0, 1, and 2 at the time of program startup. (Though this is perhaps hard to do correctly for all weird cases.) -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199605030539.HAA17445>