daemon(8): Add -P, -r, -u options from FreeBSD
authorJohn Marino <draco@marino.st>
Sun, 9 Feb 2014 17:47:52 +0000 (18:47 +0100)
committerJohn Marino <draco@marino.st>
Sun, 9 Feb 2014 19:08:00 +0000 (20:08 +0100)
commitae071d8dadb0509212ac1489ff7c7ed9c6faba0e
tree5da0d8e01e8107d8addb38cd8c5213890c584025
parentd316f7c95d4b8b07a5557eb0a39cfa39b7114297
daemon(8): Add -P, -r, -u options from FreeBSD

This is a full sync with FreeBSD.  The DragonFly daemon hasn't been
significantly updated in years.  The sync brings in:

option -P supervisor pidfile
  This writes the pid of the daemon process in the specified file.
  It gets removed automatically similarly to the child pidfile

option -u user
  It executes the command using the credentials the the specified
  user, and it requires the superuser to invoke it.

option -r restart
  This acts like a watchdog and restarts a program that terminates

The update requires an update to libutil in order to use the same
pidfile handling that FreeBSD uses.
usr.sbin/daemon/Makefile
usr.sbin/daemon/daemon.8
usr.sbin/daemon/daemon.c