svn commit: r230869 - head/usr.sbin/daemon

Pawel Jakub Dawidek pjd at FreeBSD.org
Mon Feb 6 14:44:53 UTC 2012


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-head/attachments/20120206/f0b5ec67/attachment.pgp


More information about the svn-src-head mailing list