Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Jun 2010 10:22:03 +0200
From:      =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no>
To:        "M. Warner Losh" <imp@bsdimp.com>
Cc:        yanefbsd@gmail.com, freebsd-current@freebsd.org, hselasky@c2i.net
Subject:   Re: Patch for rc.d/devd on FreeBSD 9-current
Message-ID:  <86r5jqdz9w.fsf@ds4.des.no>
In-Reply-To: <20100628.112008.459136215980124736.imp@bsdimp.com> (M. Warner Losh's message of "Mon, 28 Jun 2010 11:20:08 -0600 (MDT)")
References:  <AANLkTilnYGNz7V6z6AkeKsqUvOMN8yLvO57GM1gOIsTD@mail.gmail.com> <20100627.160845.256787458594170652.imp@bsdimp.com> <AANLkTimpbAzY2gu8Fsly6wqDYZVg7C0ID-vzeH3A3N8s@mail.gmail.com> <20100628.112008.459136215980124736.imp@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
"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 (and
hence the lock).

DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86r5jqdz9w.fsf>