diff options
author | Björn Baumbach <bb@sernet.de> | 2012-07-02 15:30:49 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2012-07-02 17:27:31 +0200 |
commit | a440df93a647d396ea19d64cba1bb5b0dee42cd0 (patch) | |
tree | 4afe35f7d8ac3bc456ff01fd1f0cef45fd3af3f7 | |
parent | 21054000287a9ba0201f2dcba2c1c225eb6893c8 (diff) | |
download | samba-a440df93a647d396ea19d64cba1bb5b0dee42cd0.tar.gz samba-a440df93a647d396ea19d64cba1bb5b0dee42cd0.tar.bz2 samba-a440df93a647d396ea19d64cba1bb5b0dee42cd0.zip |
s3-libpidfile: some more debug output
Signed-off-by: Michael Adam <obnox@samba.org>
-rw-r--r-- | source3/lib/pidfile.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/lib/pidfile.c b/source3/lib/pidfile.c index ec2044f327..e691e5f3b0 100644 --- a/source3/lib/pidfile.c +++ b/source3/lib/pidfile.c @@ -89,20 +89,26 @@ pid_t pidfile_pid(const char *program_name) pid = (pid_t)ret; if (!process_exists_by_pid(pid)) { + DEBUG(10, ("Process with PID=%d does not exist.\n", (int)pid)); goto noproc; } if (fcntl_lock(fd,F_SETLK,0,1,F_RDLCK)) { /* we could get the lock - it can't be a Samba process */ + DEBUG(10, ("Process with PID=%d is no Samba process.\n", + (int)pid)); goto noproc; } + DEBUG(10, ("Process with PID=%d is running.\n", (int)pid)); SAFE_FREE(pidFile); close(fd); return (pid_t)ret; noproc: close(fd); + DEBUG(10, ("Deleting %s, since %d is no Samba process.\n", pidFile, + (int)pid)); unlink(pidFile); SAFE_FREE(pidFile); return 0; |