summaryrefslogtreecommitdiffstats
path: root/usr.sbin/daemon/daemon.8
diff options
context:
space:
mode:
authortrociny <trociny@FreeBSD.org>2012-02-19 10:36:29 +0000
committertrociny <trociny@FreeBSD.org>2012-02-19 10:36:29 +0000
commit7e6fe25ca591804e5f55ce11640226a89c78d6ed (patch)
tree8501aae7908b252fe0c039bc6c40da83063145ac /usr.sbin/daemon/daemon.8
parent03503d2c1ce95da32a8d84e8865164a2880f1dba (diff)
downloadFreeBSD-src-7e6fe25ca591804e5f55ce11640226a89c78d6ed.zip
FreeBSD-src-7e6fe25ca591804e5f55ce11640226a89c78d6ed.tar.gz
Add -r option to restart the program if it has been terminated.
Suggested by: Andrey Zonov <andrey zonov org> MFC after: 2 weeks
Diffstat (limited to 'usr.sbin/daemon/daemon.8')
-rw-r--r--usr.sbin/daemon/daemon.822
1 files changed, 17 insertions, 5 deletions
diff --git a/usr.sbin/daemon/daemon.8 b/usr.sbin/daemon/daemon.8
index b9cf97e..2f9cb6b 100644
--- a/usr.sbin/daemon/daemon.8
+++ b/usr.sbin/daemon/daemon.8
@@ -71,16 +71,28 @@ owner is the user who runs the
regardless of whether the
.Fl u
option is used or not.
-If the monitoring
+.It Fl r
+Supervise and restart the program if it has been terminated.
+.It Fl u Ar user
+Login name of the user to execute the program under.
+Requires adequate superuser privileges.
+.El
+.Pp
+If the
+.Fl p
+or
+.Fl r
+option is specified the program is executed in a spawned child process.
+The
+.Nm
+waits until it terminates to keep the pid file locked and removes it
+after the process exits or restarts the program.
+In this case if the monitoring
.Nm
receives software termination signal (SIGTERM) it forwards it to the
spawned process.
Normally it will cause the child to exit followed by the termination
of the supervising process after removing the pidfile.
-.It Fl u Ar user
-Login name of the user to execute the program under.
-Requires adequate superuser privileges.
-.El
.Sh EXIT STATUS
The
.Nm
OpenPOWER on IntegriCloud