Date: Thu, 18 Mar 2010 15:09:52 +0100 From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no> To: Bruce Evans <brde@optusnet.com.au> Cc: svn-src-head@freebsd.org, Poul-Henning Kamp <phk@phk.freebsd.dk>, src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r205165 - head/lib/libc/gen Message-ID: <86eijhiuvj.fsf@ds4.des.no> In-Reply-To: <20100319000301.D27813@delplex.bde.org> (Bruce Evans's message of "Fri, 19 Mar 2010 00:19:36 %2B1100 (EST)") References: <44640.1268676905@critter.freebsd.dk> <20100317041500.V26092@delplex.bde.org> <86ljdq6h89.fsf@ds4.des.no> <20100319000301.D27813@delplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Bruce Evans <brde@optusnet.com.au> writes: > The above is missing purging of stdout and stderr. Someone may have > freopen()ed these in "rw" mode. If you did that, you're on your own... :) I didn't notice that fpurge() is actually a superset of fflush(). > Callers of daemon() shouldn't do this, > but if fpurge(NULL) worked right then it would be easy to purge stdout > and stderr when purging stdin and all other streams (if this is what > we want to do). I agree that fpurge(NULL) would be nice, but nothing outside the base system would use it, since it wouldn't work on older or non-FreeBSD systems - and I don't mean "wouldn't work" as in "would have no effect whatsoever", I mean "wouldn't work" as in "immediate SIGSEGV" since our fpurge() does not check for fp =3D=3D NULL. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86eijhiuvj.fsf>