summaryrefslogtreecommitdiff
path: root/source4/smbd/process_standard.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2017-03-28 21:04:23 +1300
committerStefan Metzmacher <metze@samba.org>2017-04-25 23:08:11 +0200
commitcd033ae583c52ec0d9cd7bdb387cc4558f9930e0 (patch)
tree8f3c2f6c4662ee0b7f25de9431a1281b9cde039e /source4/smbd/process_standard.c
parent04b2a18a1166872d8bb74e1d3e04376ebbecf6b9 (diff)
downloadsamba-cd033ae583c52ec0d9cd7bdb387cc4558f9930e0.tar.gz
process_standard: clean up messaging for children after exit()
This makes sure we remove any messaging sockets if a child dies or calls exit() without running the talloc destructor for messaging Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source4/smbd/process_standard.c')
-rw-r--r--source4/smbd/process_standard.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source4/smbd/process_standard.c b/source4/smbd/process_standard.c
index 967b06468d1..8d962d55130 100644
--- a/source4/smbd/process_standard.c
+++ b/source4/smbd/process_standard.c
@@ -30,6 +30,7 @@
#include "ldb_wrap.h"
#include "lib/messaging/messaging.h"
#include "lib/util/debug.h"
+#include "source3/lib/messages_dgm.h"
struct standard_child_state {
const char *name;
@@ -115,6 +116,8 @@ static void standard_child_pipe_handler(struct tevent_context *ev,
int status = 0;
pid_t pid;
+ messaging_dgm_cleanup(state->pid);
+
/* the child has closed the pipe, assume its dead */
errno = 0;
pid = waitpid(state->pid, &status, 0);