From b525aa57f138f67624038c4a1bdeca9042bcf2f0 Mon Sep 17 00:00:00 2001 From: Pavel Březina Date: Tue, 27 Aug 2013 11:11:05 +0200 Subject: SIGCHLD handler: do not call callback when pvt data where freed https://fedorahosted.org/sssd/ticket/1992 --- src/providers/child_common.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/providers/child_common.h') diff --git a/src/providers/child_common.h b/src/providers/child_common.h index 1e9f1b6c1..999f287d9 100644 --- a/src/providers/child_common.h +++ b/src/providers/child_common.h @@ -78,9 +78,15 @@ typedef void (*sss_child_callback_t)(int child_status, struct tevent_signal *sige, void *pvt); +struct sss_child_ctx_old; + /* Set up child termination signal handler */ int child_handler_setup(struct tevent_context *ev, int pid, - sss_child_callback_t cb, void *pvt); + sss_child_callback_t cb, void *pvt, + struct sss_child_ctx_old **_child_ctx); + +/* Destroy child termination signal handler */ +void child_handler_destroy(struct sss_child_ctx_old *ctx); /* Async communication with the child process via a pipe */ struct tevent_req *write_pipe_send(TALLOC_CTX *mem_ctx, -- cgit