[PATCH] D69148: Disable exit-on-SIGPIPE in lldb

Jordan Rose via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 18 09:43:35 PDT 2019


jordan_rose added inline comments.


================
Comment at: llvm/lib/Support/Unix/Signals.inc:372
       if (Sig == SIGPIPE)
-        exit(EX_IOERR);
+        if (SignalHandlerFunctionType CurrentPipeFunction = PipeSignalFunction)
+          CurrentPipeFunction();
----------------
vsk wrote:
> jordan_rose wrote:
> > Should it be doing the same sort of `exchange` as the interrupt function?
> The interrupt handler is apparently meant to be disabled after it’s used once (not sure why, the docs don’t say). As lldb is long-lived, I expect it should survive multiple SIGPIPEs.
I guess the SIGINT one makes sense so that you can kill a stuck process with ^C^C.


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

https://reviews.llvm.org/D69148





More information about the llvm-commits mailing list