X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=daemon.git;a=blobdiff_plain;f=daemon.c;h=abc076fdc1526cae3b204c860a90e2065b65a63d;hp=5b769dd49863cee1d56c120217edf75d0e870720;hb=HEAD;hpb=9c6b9ad6e19924196d66bba74bd87bc91ebf1fef diff --git a/daemon.c b/daemon.c index 5b769dd..abc076f 100644 --- a/daemon.c +++ b/daemon.c @@ -30,6 +30,7 @@ #include "config.h" #include "pidfile.h" +#include "getprogname.h" #include @@ -51,9 +52,11 @@ main(int argc, char *argv[]) const char *pidfile, *user; pid_t otherpid; + setprogname(argv[0]); + nochdir = noclose = 1; pidfile = user = NULL; - while ((ch = getopt(argc, argv, "-cfp:u:")) != -1) { + while ((ch = getopt(argc, argv, "cfp:u:")) != -1) { switch (ch) { case 'c': nochdir = 0;