summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2012-07-19 16:36:18 -0700
committerJeremy Allison <jra@samba.org>2012-07-19 16:36:18 -0700
commite8dbf2889f0f5c6d213e92cbfd97b6a874aedb03 (patch)
tree21f7c585011d551de323c74faac8f545d7f90857 /source3/smbd
parentf58d8feabc4b2c75681af1effeb4fb062cee74bd (diff)
downloadsamba-e8dbf2889f0f5c6d213e92cbfd97b6a874aedb03.tar.gz
samba-e8dbf2889f0f5c6d213e92cbfd97b6a874aedb03.tar.bz2
samba-e8dbf2889f0f5c6d213e92cbfd97b6a874aedb03.zip
Move everything to use the common pidfile functions.
The extra code in source3/lib/pidfile.c is no longer needed.
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/server.c3
-rw-r--r--source3/smbd/server_exit.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index ee1eafb0dc..63edf0020a 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -43,6 +43,7 @@
#include "lib/param/param.h"
#include "lib/background.h"
#include "lib/conn_tdb.h"
+#include "../lib/util/pidfile.h"
struct smbd_open_socket;
struct smbd_child_pid;
@@ -1285,7 +1286,7 @@ extern void build_options(bool screen);
mkdir(lp_piddir(), 0755);
if (is_daemon)
- pidfile_create_s3("smbd");
+ pidfile_create(lp_piddir(), "smbd");
status = reinit_after_fork(msg_ctx,
ev_ctx,
diff --git a/source3/smbd/server_exit.c b/source3/smbd/server_exit.c
index ab64b9c8a9..517d4c27da 100644
--- a/source3/smbd/server_exit.c
+++ b/source3/smbd/server_exit.c
@@ -44,6 +44,7 @@
#include "printing.h"
#include "serverid.h"
#include "messages.h"
+#include "../lib/util/pidfile.h"
static struct files_struct *log_writeable_file_fn(
struct files_struct *fsp, void *private_data)
@@ -216,7 +217,7 @@ static void exit_server_common(enum server_exit_reason how,
DEBUG(3,("Server exit (%s)\n",
(reason ? reason : "normal exit")));
if (am_parent) {
- pidfile_unlink_s3("smbd");
+ pidfile_unlink(lp_piddir(), "smbd");
}
gencache_stabilize();
}