1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

s3:lib: reset all tevent trace callbacks in reinit_after_fork()

Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>

With "tevent: add event trace api" we have now more callbacks to reset.
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Pavel Filipenský 2022-05-10 13:06:53 +02:00 committed by Jeremy Allison
parent fa0430b21e
commit 463f694d5c

View File

@ -455,7 +455,16 @@ NTSTATUS reinit_after_fork(struct messaging_context *msg_ctx,
}
if (ev_ctx != NULL) {
/*
* The parent can have different private data for the callbacks,
* which are gone in the child. Reset the callbacks to be safe.
*/
tevent_set_trace_callback(ev_ctx, NULL, NULL);
tevent_set_trace_fd_callback(ev_ctx, NULL, NULL);
tevent_set_trace_signal_callback(ev_ctx, NULL, NULL);
tevent_set_trace_timer_callback(ev_ctx, NULL, NULL);
tevent_set_trace_immediate_callback(ev_ctx, NULL, NULL);
tevent_set_trace_queue_callback(ev_ctx, NULL, NULL);
if (tevent_re_initialise(ev_ctx) != 0) {
smb_panic(__location__ ": Failed to re-initialise event context");
}