Date: Mon, 15 Mar 2010 18:15:05 +0000 From: "Poul-Henning Kamp" <phk@phk.freebsd.dk> To: Bruce Evans <brde@optusnet.com.au> Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r205165 - head/lib/libc/gen Message-ID: <44640.1268676905@critter.freebsd.dk> In-Reply-To: Your message of "Tue, 16 Mar 2010 03:07:05 %2B1100." <20100316024446.A24853@delplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <20100316024446.A24853@delplex.bde.org>, Bruce Evans writes: >On Tue, 16 Mar 2010, Bruce Evans wrote: > >Due to the way that daemon() works, it is really an error to have any >open streams when it is called. This is also undocumented, except >implicitly. The errors are: >- unflushed output on stdout and stderr won't get flushed normally by > the child. stdout and stderr are redirected so it will go there if > the child erroneously (?) uses these streams or simply calls exit() > which will give the default flush. The in-core FILE buffers are copied in the child process, so they should most certainly not be flushed, but rather, as they correctly are, discarded, so that when the child causes the flush, the content is only output once. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44640.1268676905>