[SSSD] [PATCH] Properly set up SIGCHLD handlers

Jakub Hrozek jhrozek at redhat.com
Thu May 6 20:00:37 UTC 2010


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

On 05/06/2010 07:52 PM, Stephen Gallagher wrote:
> On 05/06/2010 11:04 AM, Jakub Hrozek wrote:
>>
>> 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.
> 
> I have addressed your concerns in this new patch. Also, while debugging
> a double-free exception in the dynamic DNS update patch, I realized
> something about this patch. It does not make sense to expose the mem_ctx
> or return the signal event from child_handler_setup(). There is no
> situation in which we would want to cancel the signal, because it is
> always set up after the child has been forked. Even if the original
> request has ended, we need to keep this around to handle the child exit,
> otherwise we will end up with zombies.
> 
> With this in mind, I have simplified child_handler_setup and made it a
> child of the event context.
> 
> Please re-review the attached patch.
> 

Ack
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkvjH+QACgkQHsardTLnvCWxXgCgpsFT+B/Frr/e9AlP/iNjJpcG
wo4An0dhInAhg7VfIWRn3XlABELgOGsO
=4jEP
-----END PGP SIGNATURE-----



More information about the sssd-devel mailing list