dbus's service activation code sets SIGPIPE to SIG_DFL as a
sort of poor man's prctl(... PR_SET_PDEATHSIG) to detect when
the parent goes away.
It neglects to reignore the infamous signal before performing
activation, however.
This means if, for instance, journald is restarted all
services activated after it will die with SIGPIPE when logging
messages unless they explicitly ignore SIGPIPE themselves.
This commit changes dbus's service activation code to correctly
ignore SIGPIPE to protect activated services from a gruesome,
premature death.
Reviewed-by: Lennart Poettering <lennart@poettering.net>
https://bugzilla.redhat.com/show_bug.cgi?id=839258
_dbus_assert_not_reached ("Got to code after write_err_and_exit()");
}
else if (grandchild_pid == 0)
- {
+ {
+ /* Go back to ignoring SIGPIPE, since it's evil
+ */
+ signal (SIGPIPE, SIG_IGN);
+
do_exec (child_err_report_pipe[WRITE_END],
argv,
env,