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

From: Dag-Erling Smørgrav <des_at_des.no>
Date: Tue, 29 Jun 2010 10:22:03 +0200
"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).

DES
-- 
Dag-Erling Smørgrav - des_at_des.no
Received on Tue Jun 29 2010 - 06:24:15 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:05 UTC