Date: Mon, 6 Feb 2012 15:43:39 +0100 From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: Guy Helmer <ghelmer@palisadesystems.com> Cc: Mikolaj Golub <trociny@FreeBSD.org>, svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, Andrey Zonov <andrey@zonov.org>, src-committers@FreeBSD.org Subject: Re: svn commit: r230869 - head/usr.sbin/daemon Message-ID: <20120206144337.GH1324@garage.freebsd.pl> In-Reply-To: <1E1FA19C-7C4C-4288-B163-E33FC68D9837@palisadesystems.com> References: <201202011641.q11Gf0j6095461@svn.freebsd.org> <20120204074201.GA1694@garage.freebsd.pl> <4F2CEB1D.10607@zonov.org> <27A0A960-F767-4D2C-BF3E-31F73FBF4E28@palisadesystems.com> <86zkcy5ur9.fsf@kopusha.home.net> <20120205093938.GC30033@garage.freebsd.pl> <1E1FA19C-7C4C-4288-B163-E33FC68D9837@palisadesystems.com>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] On Mon, Feb 06, 2012 at 08:31:47AM -0600, Guy Helmer wrote: > If my understanding of flock(2) semantics is correct, with open(2) O_CLOEXEC or fcntl(2) FD_CLOEXEC set on the pidfile, the closing of the pidfile file descriptor during an exec will result in loss of the lock on the pidfile regardless of whether daemon(8) hangs around to wait for the child exit. My expectation is that as long as parent process holds pidfile descriptor open and locked, the pidfile should remain locked even after fork(2)/execve(2). Worth checking, though. -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk8v5xkACgkQForvXbEpPzTI5wCgyTkHOoWHzU4WHjxsGjRJnkZ0 Vg8AoOBW/FOz8tg77nzE85rF3N2ZcISl =SJOw -----END PGP SIGNATURE-----help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120206144337.GH1324>
