aboutsummaryrefslogtreecommitdiff
path: root/debianutils
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-05-07 14:52:01 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-05-07 14:52:01 +0000
commit647c20cfc2de89391c4b31da20b137248c13f302 (patch)
tree747bd25f0a5d0861537b08c48cc96b8afe504d1e /debianutils
parent6bf05cf1ff3debbab2bcc482dffb821aa458177b (diff)
downloadbusybox-w32-647c20cfc2de89391c4b31da20b137248c13f302.tar.gz
busybox-w32-647c20cfc2de89391c4b31da20b137248c13f302.tar.bz2
busybox-w32-647c20cfc2de89391c4b31da20b137248c13f302.zip
start_stop_daemon: try to clarify intended meaning of the options
Diffstat (limited to 'debianutils')
-rw-r--r--debianutils/start_stop_daemon.c41
1 files changed, 39 insertions, 2 deletions
diff --git a/debianutils/start_stop_daemon.c b/debianutils/start_stop_daemon.c
index 6919fe2a7..467deed48 100644
--- a/debianutils/start_stop_daemon.c
+++ b/debianutils/start_stop_daemon.c
@@ -8,8 +8,45 @@
8 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. 8 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
9 */ 9 */
10 10
11/* NB: we have a problem here with /proc/NN/exe usage, similar to 11/*
12 * one fixed in killall/pidof */ 12This is how it is supposed to work:
13
14start-stop-daemon [OPTIONS] [--start|--stop] [[--] arguments...]
15
16One (only) of these must be given:
17 -S,--start Start
18 -K,--stop Stop
19
20Search for matching processes.
21If --stop is given, stop all matching processes (by sending a signal).
22If --start if given, start a new process unless a matching process was found.
23
24Options controlling process matching:
25 -u,--user USERNAME|UID Only consider this user's processes
26 -n,--name PROCESS_NAME Look for processes with matching argv[0]
27 or /proc/$PID/exe or /proc/$PID/stat (comm field).
28 Only basename is compared:
29 "ntpd" == "./ntpd" == "/path/to/ntpd".
30[TODO: can PROCESS_NAME be a full pathname? Should we require full match then
31with /proc/$PID/exe or argv[0] (comm can't be matched, it never contains path)]
32 -x,--exec EXECUTABLE Look for processes with matching /proc/$PID/exe.
33 Match is performed using device+inode.
34 -p,--pidfile PID_FILE Look for processes with PID from this file
35
36Options which are valid for --start only:
37 -x,--exec EXECUTABLE Program to run (1st arg of execvp). Mandatory.
38 -a,--startas NAME argv[0] (defaults to EXECUTABLE)
39 -b,--background Put process into background
40 -N,--nicelevel N Add N to process' nice level
41 -c,--chuid USER[:[GRP]] Change to specified user [and group]
42 -m,--make-pidfile Write PID to the pidfile
43 (both -m and -p must be given!)
44Misc options:
45 -s,--signal SIG Signal to send (default:TERM)
46 -o,--oknodo Exit with status 0 if nothing is done
47 -q,--quiet Quiet
48 -v,--verbose Verbose
49*/
13 50
14#include <sys/resource.h> 51#include <sys/resource.h>
15 52