diff options
author | Andrew Tridgell <tridge@samba.org> | 1999-07-14 06:53:56 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1999-07-14 06:53:56 +0000 |
commit | d39ea03bd4f38699e3f26c4010d90bbc33aa672a (patch) | |
tree | 0bc730cd5f6bf5dabf53325e44cca3f0421f4657 | |
parent | 634373870626dd36648ec9e2dc650730cf4d28ce (diff) | |
download | samba-d39ea03bd4f38699e3f26c4010d90bbc33aa672a.tar.gz |
transfer pid_t updates from 2.0 branch
-rw-r--r-- | source/lib/pidfile.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source/lib/pidfile.c b/source/lib/pidfile.c index e1d58c25456..726e8c1f21a 100644 --- a/source/lib/pidfile.c +++ b/source/lib/pidfile.c @@ -52,7 +52,7 @@ pid_t pidfile_pid(char *name) ret = atoi(pidstr); - if (!process_exists(ret)) { + if (!process_exists((pid_t)ret)) { goto ok; } @@ -76,14 +76,14 @@ void pidfile_create(char *name) int fd; char buf[20]; pstring pidFile; - int pid; + pid_t pid; slprintf(pidFile, sizeof(pidFile)-1, "%s/%s.pid", lp_lockdir(), name); pid = pidfile_pid(name); if (pid != 0) { DEBUG(0,("ERROR: %s is already running. File %s exists and process id %d is running.\n", - name, pidFile, pid)); + name, pidFile, (int)pid)); exit(1); } @@ -109,4 +109,3 @@ void pidfile_create(char *name) } /* Leave pid file open & locked for the duration... */ } - |