Date: Thu, 02 May 1996 16:32:31 -0700 From: David Greenman <davidg@Root.COM> To: Josh MacDonald <jmacd@CS.Berkeley.EDU> Cc: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch), freebsd-hackers@freebsd.org Subject: Re: stdio problem Message-ID: <199605022332.QAA00955@Root.COM> In-Reply-To: Your message of "Thu, 02 May 1996 15:20:21 PDT." <199605022220.PAA17967@paris.CS.Berkeley.EDU>
next in thread | previous in thread | raw e-mail | index | archive | help
>The comments in stdio/freopen.c say this should work. It works everywhere >else. > >Your answers are not very helpful. > >Why couldn't you all just answer my questions instead of telling me >it is wrong. Because we're trying to determine if the behavior should be considered "undefined" (in which case being different from some other OS isn't a bug), or if there truely is a bug somewhere. In your case, the behavior difference appears to show up only when an application does wrong things. 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. -DG David Greenman Core-team/Principal Architect, The FreeBSD Project
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199605022332.QAA00955>