From owner-svn-src-all@FreeBSD.ORG Mon Mar 15 18:15:08 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 099E91065673; Mon, 15 Mar 2010 18:15:08 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id BDB7F8FC19; Mon, 15 Mar 2010 18:15:07 +0000 (UTC) Received: from critter.freebsd.dk (critter.freebsd.dk [192.168.61.3]) by phk.freebsd.dk (Postfix) with ESMTP id 541DE5C3A; Mon, 15 Mar 2010 18:15:06 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.3/8.14.3) with ESMTP id o2FIF5AR044641; Mon, 15 Mar 2010 18:15:05 GMT (envelope-from phk@critter.freebsd.dk) To: Bruce Evans From: "Poul-Henning Kamp" In-Reply-To: Your message of "Tue, 16 Mar 2010 03:07:05 +1100." <20100316024446.A24853@delplex.bde.org> Date: Mon, 15 Mar 2010 18:15:05 +0000 Message-ID: <44640.1268676905@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r205165 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Mar 2010 18:15:08 -0000 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.