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:
committed by
Stefan Metzmacher
parent
04b2a18a11
commit
cd033ae583
@ -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);
|
||||
|
@ -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
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user