diff options
author | Stephen Gallagher <sgallagh@redhat.com> | 2010-05-02 08:07:50 -0400 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2010-05-16 13:28:13 -0400 |
commit | af971fb6cf853c3a5f41aa00918013903aba1ff3 (patch) | |
tree | 7de3dfd0e6bb7d783f070e577340b3475013ef1b /src/providers/child_common.h | |
parent | 928ff09ea3975edbf53df05a1ade365a588dc69d (diff) | |
download | sssd-af971fb6cf853c3a5f41aa00918013903aba1ff3.tar.gz sssd-af971fb6cf853c3a5f41aa00918013903aba1ff3.tar.bz2 sssd-af971fb6cf853c3a5f41aa00918013903aba1ff3.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 0b2081d2..22a77dbb 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, |