Skip to content

Commit

Permalink
stacktrace-on-signal: Use kill(getpid(), sig_num)
Browse files Browse the repository at this point in the history
kill(0, ...) re-raises the signal to every processes in the process
group which may impact unrelated processes.

Concretely, in our CI pipeline, a segfaulting Suricata process killed
the test driver.
  • Loading branch information
awelzel authored and victorjulien committed May 9, 2022
1 parent b5d1a80 commit b6407c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/suricata.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ static void SignalHandlerUnexpected(int sig_num, siginfo_t *info, void *context)

terminate:
// Propagate signal to watchers, if any
kill(0, sig_num);
kill(getpid(), sig_num);
}
#undef UNW_LOCAL_ONLY
#endif /* HAVE_LIBUNWIND */
Expand Down

0 comments on commit b6407c4

Please sign in to comment.