diff options
author | Stephen Gallagher <sgallagh@redhat.com> | 2010-05-02 08:07:50 -0400 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2010-05-07 16:38:21 -0400 |
commit | 9967a29726b7fd37dfa910807f864be6e7868897 (patch) | |
tree | bbd0d322f5ecfd666ee98e385261591cd50b9884 /src/providers/child_common.h | |
parent | cdae086732a08b97e7f5e3e5147a985d04730971 (diff) | |
download | sssd-9967a29726b7fd37dfa910807f864be6e7868897.tar.gz sssd-9967a29726b7fd37dfa910807f864be6e7868897.tar.xz sssd-9967a29726b7fd37dfa910807f864be6e7868897.zip |
Properly set up SIGCHLD handlers
Instead of having all-purpose SIGCHLD handlers that try to catch
every occurrence, we instead create a per-PID handler. This will
allow us to specify callbacks to occur when certain children exit.
Diffstat (limited to 'src/providers/child_common.h')
-rw-r--r-- | src/providers/child_common.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/providers/child_common.h b/src/providers/child_common.h index 0b2081d2d..22a77dbbe 100644 --- a/src/providers/child_common.h +++ b/src/providers/child_common.h @@ -45,6 +45,18 @@ struct io_buffer { size_t size; }; +/* Callback to be invoked when a sigchld handler is called. + * The tevent_signal * associated with the handler will be + * freed automatically when this function returns. + */ +typedef void (*sss_child_callback_t)(int child_status, + struct tevent_signal *sige, + void *pvt); + +/* Set up child termination signal handler */ +int child_handler_setup(struct tevent_context *ev, int pid, + sss_child_callback_t cb, void *pvt); + /* Async communication with the child process via a pipe */ struct tevent_req *write_pipe_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, |