multipathd: set correct PID when running in debug mode
authorHannes Reinecke <hare@suse.de>
Wed, 9 Apr 2014 07:18:17 +0000 (09:18 +0200)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Sun, 29 Mar 2015 15:43:33 +0000 (17:43 +0200)
When running in debug mode the PID is not set, causing
the PID in the pidfile to always be set to '0'.

Signed-off-by: Hannes Reinecke <hare@suse.de>
multipathd/main.c

index 4f02211..3e22ad1 100644 (file)
@@ -2056,6 +2056,7 @@ main (int argc, char *argv[])
                if (!isatty(fileno(stdout)))
                        setbuf(stdout, NULL);
                err = 0;
+               daemon_pid = getpid();
        } else
                err = daemonize();