Make sure that SIGCHLD is not treated as a user-generated signal
in which case it could be ignored. Bug #676
This commit is contained in:
@@ -895,7 +895,7 @@ handler(int s, siginfo_t *info, void *context)
|
||||
* kill itself. For example, this can happen with some versions of
|
||||
* reboot that call kill(-1, SIGTERM) to kill all other processes.
|
||||
*/
|
||||
if (USER_SIGNALED(info)) {
|
||||
if (s != SIGCHLD && USER_SIGNALED(info)) {
|
||||
pid_t si_pgrp = getpgid(info->si_pid);
|
||||
if (si_pgrp != (pid_t)-1) {
|
||||
if (si_pgrp == ppgrp || si_pgrp == cmnd_pid)
|
||||
|
@@ -147,7 +147,7 @@ mon_handler(int s, siginfo_t *info, void *context)
|
||||
* itself. This can happen with, e.g., BSD-derived versions of
|
||||
* reboot that call kill(-1, SIGTERM) to kill all other processes.
|
||||
*/
|
||||
if (USER_SIGNALED(info)) {
|
||||
if (s != SIGCHLD && USER_SIGNALED(info)) {
|
||||
pid_t si_pgrp = getpgid(info->si_pid);
|
||||
if (si_pgrp != (pid_t)-1) {
|
||||
if (si_pgrp == cmnd_pgrp)
|
||||
|
Reference in New Issue
Block a user