[llvm] [Support] Don't re-raise signals sent from kernel (PR #145759)

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 8 13:53:05 PDT 2025


================
@@ -413,10 +413,22 @@ static void SignalHandler(int Sig, siginfo_t *Info, void *) {
     raise(Sig);
 #endif
 
-  // Signal sent from another process, do not assume that continuing the
-  // execution would re-raise it.
-  if (Info->si_pid != getpid())
+  // Signal sent from another userspace process, do not assume that continuing
+  // the execution would re-raise it.
+  if (Info->si_pid != getpid() && Info->si_pid != 0) {
+#if defined(__linux__) || defined(__ANDROID__)
----------------
pcc wrote:

No need to check `__ANDROID__` here, Android also defines `__linux__`.

https://github.com/llvm/llvm-project/pull/145759


More information about the llvm-commits mailing list