[SSSD] [PATCH] Properly set up SIGCHLD handlers
Stephen Gallagher
sgallagh at redhat.com
Thu May 6 17:52:53 UTC 2010
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.
--
Stephen Gallagher
RHCE 804006346421761
Delivering value year after year.
Red Hat ranks #1 in value among software vendors.
http://www.redhat.com/promo/vendor/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Properly-set-up-SIGCHLD-handlers.patch
Type: text/x-patch
Size: 11397 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20100506/c78a35c0/attachment.bin>
More information about the sssd-devel
mailing list