From owner-freebsd-current@FreeBSD.ORG Tue Jun 29 08:24:15 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E3971106564A for ; Tue, 29 Jun 2010 08:24:15 +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 A30C78FC1F for ; Tue, 29 Jun 2010 08:24:15 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 958A81FFC33; Tue, 29 Jun 2010 08:24:14 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 433ED84579; Tue, 29 Jun 2010 10:22:03 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: "M. Warner Losh" References: <20100627.160845.256787458594170652.imp@bsdimp.com> <20100628.112008.459136215980124736.imp@bsdimp.com> Date: Tue, 29 Jun 2010 10:22:03 +0200 In-Reply-To: <20100628.112008.459136215980124736.imp@bsdimp.com> (M. Warner Losh's message of "Mon, 28 Jun 2010 11:20:08 -0600 (MDT)") Message-ID: <86r5jqdz9w.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: yanefbsd@gmail.com, freebsd-current@freebsd.org, hselasky@c2i.net Subject: Re: Patch for rc.d/devd on FreeBSD 9-current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2010 08:24:16 -0000 "M. Warner Losh" writes: > + /* > + * Close the PID file, and all other open descriptors. > + * Inherit std{in,out,err} only. > + */ > + cfg.close_pidfile(); > + ::closefrom(3); Actually, closefrom() is sufficient, since the only resource held by the pidfile that would persist across execve() is the file descriptor (and hence the lock). DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no