[PATCH] D79847: [Support] On Windows, handle interrupt signals without crash message

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 21 03:13:15 PDT 2020


jhenderson marked 2 inline comments as done.
jhenderson added a comment.

In D79847#2047739 <https://reviews.llvm.org/D79847#2047739>, @MaskRay wrote:

> > On Linux, the signal handlers are not run on signals such as SIGINT due to CTRL-C.
>
> That is the default behavior on a *NIX platform: on SIGINT, unregister the handler and call `raise(SIGINT)` to let the kernel terminate the process.
>
> If a callback is registered via `llvm::sys::SetInterruptFunction` (used by bugpoint and clangd), that callback will run instead.


I wasn't quite sure what this comment was suggesting/discussing. Either way, I'll tweak my commit message to say that this matches the default behaviour for LLVM on Unix (see `sys::CleanupOnSignal`).



================
Comment at: llvm/test/Support/interrupts.test:4
+# RUN: %python %s wrapper llvm-symbolizer 2> %t.err
+# RUN: FileCheck %s --input-file=%t.err --allow-empty --implicit-check-not={{.}}
+
----------------
MaskRay wrote:
> `count 0 < %t.err`
> 
> or `2>&1 | count 0`
I'm deliberately avoiding the latter, since llvm-symbolizer prints to stdout as part of the script below.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79847/new/

https://reviews.llvm.org/D79847





More information about the llvm-commits mailing list