diff options
author | Gerald Carter <jerry@samba.org> | 2002-05-09 04:08:00 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2002-05-09 04:08:00 +0000 |
commit | 4db4e95ab2140e179d0f15ad390b7a994b6642f2 (patch) | |
tree | 7c5829c3a3d11860fc164b9f0aa7c593eb4d0a62 /source3/lib/pidfile.c | |
parent | 9ac3ca512a4d6a99848c708d1b83adcb0d452b59 (diff) | |
download | samba-4db4e95ab2140e179d0f15ad390b7a994b6642f2.tar.gz samba-4db4e95ab2140e179d0f15ad390b7a994b6642f2.tar.bz2 samba-4db4e95ab2140e179d0f15ad390b7a994b6642f2.zip |
pidfile merge from SAMBA_2_2 (including --with-fhs) and a few other minor things; compiles and shouldnt break, but needs testing
(This used to be commit 19b9b50d9039afe614284aaf379f9f1078e2e307)
Diffstat (limited to 'source3/lib/pidfile.c')
-rw-r--r-- | source3/lib/pidfile.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/source3/lib/pidfile.c b/source3/lib/pidfile.c index 28fd959b54..b98259fe5e 100644 --- a/source3/lib/pidfile.c +++ b/source3/lib/pidfile.c @@ -35,7 +35,7 @@ pid_t pidfile_pid(char *name) unsigned ret; pstring pidFile; - slprintf(pidFile, sizeof(pidFile)-1, "%s/%s.pid", lp_lockdir(), name); + slprintf(pidFile, sizeof(pidFile)-1, "%s/%s.pid", lp_piddir(), name); fd = sys_open(pidFile, O_NONBLOCK | O_RDONLY, 0644); if (fd == -1) { @@ -68,10 +68,7 @@ pid_t pidfile_pid(char *name) return 0; } -/* Create a pid file in the lock directory. open it and leave it locked. - This must be done after a call to lp_load() as it uses the lp_lockdir() - function to generate the path to the pidfile. */ - +/* create a pid file in the pid directory. open it and leave it locked */ void pidfile_create(char *name) { int fd; @@ -79,7 +76,7 @@ void pidfile_create(char *name) pstring pidFile; pid_t pid; - slprintf(pidFile, sizeof(pidFile)-1, "%s/%s.pid", lp_lockdir(), name); + slprintf(pidFile, sizeof(pidFile)-1, "%s/%s.pid", lp_piddir(), name); pid = pidfile_pid(name); if (pid != 0) { |