[SSSD] [PATCH] Add common SIGCHLD handling.

Stephen Gallagher sgallagh at redhat.com
Thu Dec 15 03:00:58 UTC 2011


On Wed, 2011-12-14 at 13:03 -0500, Stephen Gallagher wrote:
> On Wed, 2011-12-14 at 09:15 -0500, Stephen Gallagher wrote:
> > 
> > On Dec 14, 2011, at 9:09 AM, Jakub Hrozek <jhrozek at redhat.com> wrote:
> > > 
> > > Are you going to fix the two comments you had originally in the later
> > > patch? Those were don't consider it fatal if the PID isn't found
> > > in the hash in sss_child_handler() and reordering sss_child_invoke_cb()
> > > 
> > > If so, then ack
> > 
> > 
> > The first part of that I already described above as being an incorrect
> > reading of the source. I missed the second part and I'll fix that
> > shortly.
> 
> 
> New patch attached fixes the missing reordering of the
> sssd_child_invoke_cb() and adds more explicit handling of unknown PIDs
> (with a new DEBUG log message).

I discovered two more issues with this patch, one serious, one cosmetic
but annoying.

1) sss_child_register() wasn't assigning child->sigchld_ctx, so if the
child was freed, the destructor would segfault trying to remove this
child from the hash table.

2) sss_child_handler() needed to ignore a return of pid=0 (which would
happen every time as the last pass through) or else it would print an
error trying to find pid 0 in the hash table (which it had better not
be. I don't want SSSD monitoring init!)

New patches attached.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-common-SIGCHLD-handling-for-providers.patch
Type: text/x-patch
Size: 14065 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20111214/96afeed1/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Move-child_common-routines-to-util.patch
Type: text/x-patch
Size: 11222 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20111214/96afeed1/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20111214/96afeed1/attachment.sig>


More information about the sssd-devel mailing list