s3-libpidfile: fix check for running process.
authorBjörn Baumbach <bb@sernet.de>
Mon, 2 Jul 2012 13:43:49 +0000 (15:43 +0200)
committerMichael Adam <obnox@samba.org>
Mon, 2 Jul 2012 17:19:21 +0000 (19:19 +0200)
Call pidfile_pid() with process name instead of pid file name.
pidfile_pid does create the pid file name by itself.

Signed-off-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Mon Jul  2 19:19:21 CEST 2012 on sn-devel-104

source3/lib/pidfile.c

index e691e5f3b0491d889de564ad25ab066c82ab9150..f0c075cba6c8499abd5a5486628ea32f4ef3d3bf 100644 (file)
@@ -146,7 +146,7 @@ void pidfile_create(const char *program_name)
                smb_panic("asprintf failed");
        }
 
-       pid = pidfile_pid(name);
+       pid = pidfile_pid(program_name);
        if (pid != 0) {
                DEBUG(0,("ERROR: %s is already running. File %s exists and process id %d is running.\n", 
                         name, pidFile_name, (int)pid));