Date: Tue, 29 Jun 2010 11:15:48 -0600 (MDT) From: "M. Warner Losh" <imp@bsdimp.com> To: des@des.no Cc: yanefbsd@gmail.com, freebsd-current@freebsd.org, hselasky@c2i.net Subject: Re: Patch for rc.d/devd on FreeBSD 9-current Message-ID: <20100629.111548.441937720337056244.imp@bsdimp.com> In-Reply-To: <86r5jqdz9w.fsf@ds4.des.no> References: <AANLkTimpbAzY2gu8Fsly6wqDYZVg7C0ID-vzeH3A3N8s@mail.gmail.com> <20100628.112008.459136215980124736.imp@bsdimp.com> <86r5jqdz9w.fsf@ds4.des.no>
next in thread | previous in thread | raw e-mail | index | archive | help
In message: <86r5jqdz9w.fsf@ds4.des.no>
Dag-Erling Sm=F8rgrav <des@des.no> writes:
: "M. Warner Losh" <imp@bsdimp.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100629.111548.441937720337056244.imp>
