diff options
author | phk <phk@FreeBSD.org> | 2004-06-02 06:48:13 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2004-06-02 06:48:13 +0000 |
commit | 86b461c0795331c86398e4ff65b3657463450625 (patch) | |
tree | 2942b27b06985627f789043898dc12cc54d3ee8b /usr.sbin/daemon/daemon.8 | |
parent | 33a226cf5e6ff673342c1b1a66101d0714e4b2dd (diff) | |
download | FreeBSD-src-86b461c0795331c86398e4ff65b3657463450625.zip FreeBSD-src-86b461c0795331c86398e4ff65b3657463450625.tar.gz |
Give daemon(8) the ability to create a pid-file. Since the target program
does not know anything about the pid-file and we don't keep a babysitting
process for the task, the pid-file will linger.
Submitted by: mi
PR: 56398
Diffstat (limited to 'usr.sbin/daemon/daemon.8')
-rw-r--r-- | usr.sbin/daemon/daemon.8 | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/usr.sbin/daemon/daemon.8 b/usr.sbin/daemon/daemon.8 index ec49f47..23702db 100644 --- a/usr.sbin/daemon/daemon.8 +++ b/usr.sbin/daemon/daemon.8 @@ -35,6 +35,7 @@ .Sh SYNOPSIS .Nm .Op Fl cf +.Op Fl p Ar pidfile .Ar command arguments ... .Sh DESCRIPTION The @@ -50,13 +51,20 @@ Change the current working directory to the root .It Fl f Redirect standard input, standard output and standard error to .Pa /dev/null . +.It Fl p Ar file +Write the id of the created process into the +.Ar file . +Note, that the file will be created shortly before the process is +actually executed, and will remain after the process exits (although +it will be removed if the execution fails). .El .Sh DIAGNOSTICS The .Nm utility exits 1 if an error is returned by the .Xr daemon 3 -library routine, otherwise 0. +library routine, 2 if the pid-file is requested, but can not be opened, +otherwise 0. If the command cannot be executed, an error message is displayed on standard error unless the .Fl f |