freebsd-skq/usr.sbin/daemon
trociny 15a9e88162 The pidfile_open(3) is going to be fixed to set close-on-exec in order
not to leak the descriptor after exec(3). This raises the issue for
daemon(3) of the pidfile lock to be lost when the child process
executes.

To solve this and also to have the pidfile cleaned up when the program
exits, if a pidfile is specified, spawn a child to exec the command
and wait in the parent keeping the pidfile locked until the child
process exits and remove the file.

Reported by:	Andrey Zonov <andrey zonov org>
Suggested by:	pjd
Reviewed by:	pjd
MFC after:	2 weeks
2012-02-19 10:20:37 +00:00
..
daemon.8 The pidfile_open(3) is going to be fixed to set close-on-exec in order 2012-02-19 10:20:37 +00:00
daemon.c The pidfile_open(3) is going to be fixed to set close-on-exec in order 2012-02-19 10:20:37 +00:00
Makefile The last big commit: let usr.sbin/ use WARNS=6 by default. 2010-01-02 11:07:44 +00:00