+/*
+This is how it is supposed to work:
+
+start-stop-daemon [OPTIONS] [--start|--stop] [[--] arguments...]
+
+One (only) of these must be given:
+ -S,--start Start
+ -K,--stop Stop
+
+Search for matching processes.
+If --stop is given, stop all matching processes (by sending a signal).
+If --start is given, start a new process unless a matching process was found.
+
+Options controlling process matching
+(if multiple conditions are specified, all must match):
+ -u,--user USERNAME|UID Only consider this user's processes
+ -n,--name PROCESS_NAME Look for processes by matching PROCESS_NAME
+ with comm field in /proc/$PID/stat.
+ Only basename is compared:
+ "ntpd" == "./ntpd" == "/path/to/ntpd".
+[TODO: can PROCESS_NAME be a full pathname? Should we require full match then
+with /proc/$PID/exe or argv[0] (comm can't be matched, it never contains path)]
+ -x,--exec EXECUTABLE Look for processes that were started with this
+ command in /proc/$PID/cmdline.
+ Unlike -n, we match against the full path:
+ "ntpd" != "./ntpd" != "/path/to/ntpd"
+ -p,--pidfile PID_FILE Look for processes with PID from this file
+
+Options which are valid for --start only:
+ -x,--exec EXECUTABLE Program to run (1st arg of execvp). Mandatory.
+ -a,--startas NAME argv[0] (defaults to EXECUTABLE)
+ -b,--background Put process into background
+ -N,--nicelevel N Add N to process' nice level
+ -c,--chuid USER[:[GRP]] Change to specified user [and group]
+ -m,--make-pidfile Write PID to the pidfile
+ (both -m and -p must be given!)
+
+Options which are valid for --stop only:
+ -s,--signal SIG Signal to send (default:TERM)
+ -t,--test Exit with status 0 if process is found
+ (we don't actually start or stop daemons)
+
+Misc options:
+ -o,--oknodo Exit with status 0 if nothing is done
+ -q,--quiet Quiet
+ -v,--verbose Verbose
+*/
+
+#include <sys/resource.h>
+
+/* Override ENABLE_FEATURE_PIDFILE */
+#define WANT_PIDFILE 1
+#include "libbb.h"