From cd033ae583c52ec0d9cd7bdb387cc4558f9930e0 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 28 Mar 2017 21:04:23 +1300 Subject: 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 Reviewed-by: Stefan Metzmacher --- source4/smbd/process_standard.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source4/smbd/process_standard.c') 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); -- cgit v1.2.1