[SSSD] [PATCH] Properly set up SIGCHLD handlers

Jakub Hrozek jhrozek at redhat.com
Thu May 6 15:04:06 UTC 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/04/2010 08:41 PM, Stephen Gallagher wrote:
> On 05/04/2010 02:37 PM, Stephen Gallagher wrote:
>> On 05/03/2010 04:57 PM, Sumit Bose wrote:
>>> Nack, with a wrong password the krb5_child is not handled properly
>>> because the SIG_CHLD handler is never called and krb5_child remains in
>>> zombie state.
>>
>>
>> Ok, I've fixed this by allocating the child handler on the event context
>> instead of the kerberos request context. This is safe to do because the
>> child handler will free the signal request when it's finished.
>>
>> I also modified it so that the callback handler ALWAYS frees the tevent
>> signal handler after the callback returns. I will amend my dynamic DNS
>> patch to account for this as well.
>>
>> It doesn't make sense to leave that up to the callback to free it,
>> because we're not going to reuse the pid.
>>
> 
> Sorry, forgot to squash part of the patch in. New patch is correct.
> 
> 

Seems to be working fine but does "struct tevent_signal *child_sig;"
have to be a global variable? Also, using WEXITSTATUS() without checking
for WIFEXITED() first might give inaccurate results in case the child
was in fact terminated by a signal or stopped..this is probably just a
very corner case, though.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkvi2mYACgkQHsardTLnvCWDcgCgjz/8cHlKYN8REw9wftJjNr1l
q5gAoOXWMCPZ0mbIMsKshAjRgQm+cB6b
=sSzB
-----END PGP SIGNATURE-----



More information about the sssd-devel mailing list