From owner-svn-src-head@FreeBSD.ORG Thu Mar 18 14:09:54 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B156106564A; Thu, 18 Mar 2010 14:09:54 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 0AE258FC08; Thu, 18 Mar 2010 14:09:53 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 1D02D1FFC53; Thu, 18 Mar 2010 14:09:53 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id E4F82844DF; Thu, 18 Mar 2010 15:09:52 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Bruce Evans References: <44640.1268676905@critter.freebsd.dk> <20100317041500.V26092@delplex.bde.org> <86ljdq6h89.fsf@ds4.des.no> <20100319000301.D27813@delplex.bde.org> Date: Thu, 18 Mar 2010 15:09:52 +0100 In-Reply-To: <20100319000301.D27813@delplex.bde.org> (Bruce Evans's message of "Fri, 19 Mar 2010 00:19:36 +1100 (EST)") Message-ID: <86eijhiuvj.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, Poul-Henning Kamp , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r205165 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Mar 2010 14:09:54 -0000 Bruce Evans 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