Deleted Added
full compact
27c27
< .\" $FreeBSD: head/usr.sbin/daemon/daemon.8 236551 2012-06-04 09:25:01Z trociny $
---
> .\" $FreeBSD: head/usr.sbin/daemon/daemon.8 255521 2013-09-13 16:57:28Z jmg $
29c29
< .Dd June 4, 2012
---
> .Dd September 13, 2013
38c38,39
< .Op Fl p Ar pidfile
---
> .Op Fl p Ar child_pidfile
> .Op Fl P Ar supervisor_pidfile
56c57
< .It Fl p Ar file
---
> .It Fl p Ar child_pidfile
58c59
< .Ar file
---
> .Ar child_pidfile
65c66
< .Ar file
---
> .Ar child_pidfile
68c69
< .Ar file
---
> .Ar child_pidfile
73a75,94
> .It Fl P Ar supervisor_pidfile
> Write the ID of the
> .Nm
> process into the
> .Ar supervisor_pidfile
> using the
> .Xr pidfile 3
> functionality.
> The program is executed in a spawned child process while the
> .Nm
> waits until it terminates to keep the
> .Ar supervisor_pidfile
> locked and removes it after the process exits.
> The
> .Ar supervisor_pidfile
> owner is the user who runs the
> .Nm
> regardless of whether the
> .Fl u
> option is used or not.
82c103,104
< .Fl p
---
> .Fl p ,
> .Fl P
88c110
< waits until it terminates to keep the pid file locked and removes it
---
> waits until it terminates to keep the pid file(s) locked and removes them
94,95c116,133
< Normally it will cause the child to exit followed by the termination
< of the supervising process after removing the pidfile.
---
> Normally it will cause the child to exit, remove the pidfile(s)
> and then terminate.
> .Pp
> The
> .Fl P
> option is useful combined with the
> .Fl r
> option as
> .Ar supervisor_pidfile
> contains the ID of the supervisor
> not the child. This is especially important if you use
> .Fl r
> in an rc script as the
> .Fl p
> option will give you the child's ID to signal when you attempt to
> stop the service, causing
> .Nm
> to restart the child.
101,102c139,142
< library routine, 2 if the
< .Ar pidfile
---
> library routine, 2 if
> .Ar child_pidfile
> or
> .Ar supervisor_pidfile