diff options
author | Andrew Bartlett <abartlet@samba.org> | 2017-03-28 21:04:23 +1300 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2017-04-25 23:08:11 +0200 |
commit | cd033ae583c52ec0d9cd7bdb387cc4558f9930e0 (patch) | |
tree | 8f3c2f6c4662ee0b7f25de9431a1281b9cde039e /source4/smbd | |
parent | 04b2a18a1166872d8bb74e1d3e04376ebbecf6b9 (diff) | |
download | samba-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')
-rw-r--r-- | source4/smbd/process_standard.c | 3 | ||||
-rw-r--r-- | source4/smbd/wscript_build | 2 |
2 files changed, 4 insertions, 1 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); diff --git a/source4/smbd/wscript_build b/source4/smbd/wscript_build index ca2039694a4..c28bc1df38a 100644 --- a/source4/smbd/wscript_build +++ b/source4/smbd/wscript_build @@ -40,7 +40,7 @@ bld.SAMBA_MODULE('process_model_standard', source='process_standard.c', subsystem='process_model', init_function='process_model_standard_init', - deps='MESSAGING events ldbsamba process_model samba-sockets cluster', + deps='MESSAGING events ldbsamba process_model samba-sockets cluster messages_dgm', internal_module=False ) |