1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-26 01:49:31 +03:00

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>
This commit is contained in:
Andrew Bartlett
2017-03-28 21:04:23 +13:00
committed by Stefan Metzmacher
parent 04b2a18a11
commit cd033ae583
2 changed files with 4 additions and 1 deletions

View File

@ -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);

View File

@ -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
)