Add support for resetting signal masks
By default, child process will inherit signal masks (blocked signals)
from its parent process. Once the signal is blocked, the child process
will not be able to receive notifications for those signals.
Some parent processes (such as system daemons implemented using
brillo::Daemon) will block signals such as SIGTERM and SIGINT, so that
they can use signalfd to monitor those signals instead. In this case,
the child process will not be able to receive notification for these
To fix it, allow the caller to specify a flag to indicate if child
process should reset the signal mask or not.
2 files changed