Date: Mon, 19 Oct 2009 14:29:38 +0300 From: Kostik Belousov <kostikbel@gmail.com> To: Dag-Erling Sm??rgrav <des@des.no> Cc: Warren Block <wblock@wonkity.com>, current@freebsd.org Subject: Re: /etc/rc.d locking devd.pid Message-ID: <20091019112938.GT2160@deviant.kiev.zoral.com.ua> In-Reply-To: <86my3n6d8k.fsf@ds4.des.no> References: <alpine.BSF.2.00.0910171503010.89326@wonkity.com> <alpine.BSF.2.00.0910181542440.94243@wonkity.com> <20091018220935.GR2160@deviant.kiev.zoral.com.ua> <86my3n6d8k.fsf@ds4.des.no>
next in thread | previous in thread | raw e-mail | index | archive | help
--s3R87C3fwYeCSZ0b Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 19, 2009 at 09:42:51AM +0200, Dag-Erling Sm??rgrav wrote: > Kostik Belousov <kostikbel@gmail.com> writes: > > I think that this is a generic issue with pidfile/fork interaction. > > It is not obvious whether setting FD_CLOEXEC flag is right thing to > > do there. >=20 > Most certainly not. Why ? We definitely leak file descriptor on exec(2) unless daemon explicitely closes it after fork. I said that it is unobvious is it right to enforce FD_CLOEXEC unconditionally, because some daemons exec() itself to reinitialize. >=20 > > Anyway, please test. >=20 > Please read flopen.c's revision history. I am aware of flock->fcntl->flock story, but it is relevant to fork(2), not to the exec(2) issues. --s3R87C3fwYeCSZ0b Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkrcTaEACgkQC3+MBN1Mb4jdQACbBaBOLuqgoxy+MxpmckBHQ86r vtEAn3SROKpl4x3IXGef3UGQP0kN9wgh =yeVt -----END PGP SIGNATURE----- --s3R87C3fwYeCSZ0b--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091019112938.GT2160>