]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
stacktrace-on-signal: Use kill(getpid(), sig_num) 7389/head 7395/head
authorArne Welzel <arne.welzel@corelight.com>
Wed, 4 May 2022 18:06:36 +0000 (20:06 +0200)
committerVictor Julien <vjulien@oisf.net>
Mon, 9 May 2022 14:42:09 +0000 (16:42 +0200)
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.

src/suricata.c

index 24ffa0fe64454554e84f83c18393a411256ee243..b246ce13f1619a230eefdc79d5c757b5efffcd9d 100644 (file)
@@ -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 */