From owner-freebsd-current@FreeBSD.ORG Tue Jun 29 17:26:21 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 945681065738 for ; Tue, 29 Jun 2010 17:26:21 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 4D5108FC21 for ; Tue, 29 Jun 2010 17:26:21 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o5THFYql011938; Tue, 29 Jun 2010 11:15:35 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 29 Jun 2010 11:15:48 -0600 (MDT) Message-Id: <20100629.111548.441937720337056244.imp@bsdimp.com> To: des@des.no From: "M. Warner Losh" In-Reply-To: <86r5jqdz9w.fsf@ds4.des.no> References: <20100628.112008.459136215980124736.imp@bsdimp.com> <86r5jqdz9w.fsf@ds4.des.no> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 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 17:26:21 -0000 In message: <86r5jqdz9w.fsf@ds4.des.no> Dag-Erling Sm=F8rgrav writes: : "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 (an= d : hence the lock). I went ahead and used pidfile_close in this context because that's what's recommended in the man page. I know it is likely redundant, but I thought better safe than sorry... Warner