summaryrefslogtreecommitdiffstats
path: root/src/providers/krb5/krb5_auth.c
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2010-05-02 08:07:50 -0400
committerStephen Gallagher <sgallagh@redhat.com>2010-05-16 13:28:13 -0400
commitaf971fb6cf853c3a5f41aa00918013903aba1ff3 (patch)
tree7de3dfd0e6bb7d783f070e577340b3475013ef1b /src/providers/krb5/krb5_auth.c
parent928ff09ea3975edbf53df05a1ade365a588dc69d (diff)
downloadsssd-af971fb6cf853c3a5f41aa00918013903aba1ff3.tar.gz
sssd-af971fb6cf853c3a5f41aa00918013903aba1ff3.tar.xz
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/krb5/krb5_auth.c')
-rw-r--r--src/providers/krb5/krb5_auth.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/providers/krb5/krb5_auth.c b/src/providers/krb5/krb5_auth.c
index a3ae39428..e16bc3933 100644
--- a/src/providers/krb5/krb5_auth.c
+++ b/src/providers/krb5/krb5_auth.c
@@ -467,6 +467,12 @@ static errno_t fork_child(struct tevent_req *req, struct tevent_context *ev,
fd_nonblocking(kr->read_from_child_fd);
fd_nonblocking(kr->write_to_child_fd);
+ ret = child_handler_setup(ev, pid, NULL, NULL);
+ if (ret != EOK) {
+ DEBUG(1, ("Could not set up child signal handler\n"));
+ return ret;
+ }
+
err = activate_child_timeout_handler(req, ev, kr);
if (err != EOK) {
DEBUG(1, ("activate_child_timeout_handler failed.\n"));