Patch for rc.d/devd on FreeBSD 9-current

M. Warner Losh imp at bsdimp.com
Tue Jun 29 17:26:21 UTC 2010


In message: <86r5jqdz9w.fsf at ds4.des.no>
            Dag-Erling Smørgrav <des at des.no> writes:
: "M. Warner Losh" <imp at 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 (and
: 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


More information about the freebsd-current mailing list