]> gitweb @ CieloNegro.org - daemon.git/blobdiff - daemon.c
I had to copy malloc.c from the gnulib. Why...?
[daemon.git] / daemon.c
index 5b769dd49863cee1d56c120217edf75d0e870720..35b7269dbd17993bafcbe51a2e2c44dacc450e6c 100644 (file)
--- a/daemon.c
+++ b/daemon.c
@@ -30,6 +30,7 @@
 
 #include "config.h"
 #include "pidfile.h"
+#include "getprogname.h"
 
 #include <sys/param.h>
 
@@ -51,6 +52,8 @@ 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) {