HomeClusterLabs Projects

Low: libservices (sync): ensure no zombie is left behind

Description

Low: libservices (sync): ensure no zombie is left behind

It could happen because this parent that is to wait for its
not-well-behaved child is knowlingly not blocking any signal (beside
SIGCHLD explicitly in case of using signalfd facility) and delivery of
such signal can interrupt waitpid, at least on paper, so protect
against this accordingly.

Speaking of SIGCHLD in plain self-pipe (not signalfd one) context, while
there's no clash with other synchronous actions, it may be the case with
asynchronous ones (or for that matter, arbitrary other fork-related
activities in the main program a library can have no idea about), and
this is exactly what could interrupt waitpid for real.

Details

Provenance
Jan Pokorný <jpokorny@redhat.com>Authored on Jan 31 2017, 2:06 PM
Parents
rP40ba78a85c5a: Merge pull request #1215 from kgaillot/fixes
Branches
Unknown
Tags
Unknown

Event Timeline