From af971fb6cf853c3a5f41aa00918013903aba1ff3 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Sun, 2 May 2010 08:07:50 -0400 Subject: 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. --- src/providers/krb5/krb5_auth.c | 6 ++++++ src/providers/krb5/krb5_init.c | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'src/providers/krb5') diff --git a/src/providers/krb5/krb5_auth.c b/src/providers/krb5/krb5_auth.c index a3ae3942..e16bc393 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")); diff --git a/src/providers/krb5/krb5_init.c b/src/providers/krb5/krb5_init.c index 03d95260..0ad58926 100644 --- a/src/providers/krb5/krb5_init.c +++ b/src/providers/krb5/krb5_init.c @@ -141,7 +141,6 @@ int sssm_krb5_auth_init(struct be_ctx *bectx, goto fail; } talloc_steal(sige, sig_realm); - if (debug_to_file != 0) { ret = open_debug_file_ex("krb5_child", &debug_filep); if (ret != EOK) { -- cgit