The current code uses kill(0, caught_signal) after regular
signal cleanup and before exit (all just to make shells happy).
Unfortunately, kill(0, ...) is a bad idea. It seems better to use
kill(getpid(), ...) otherwise we kill our parent process too.
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=
1063887
Signed-off-by: Karel Zak <kzak@redhat.com>
caught_signal = SIGKILL;
break;
}
- kill(0, caught_signal);
+ kill(getpid(), caught_signal);
}
exit (status);
}