[PATCH] D53000: [Support] Ignore SIGPIPE, don't error on EPIPE from raw_fd_ostream

Nick Desaulniers via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 8 15:14:58 PDT 2018


nickdesaulniers updated this revision to Diff 168715.
nickdesaulniers added a comment.

- don't mask EPIPE


Repository:
  rL LLVM

https://reviews.llvm.org/D53000

Files:
  lib/Support/Unix/Signals.inc


Index: lib/Support/Unix/Signals.inc
===================================================================
--- lib/Support/Unix/Signals.inc
+++ lib/Support/Unix/Signals.inc
@@ -334,6 +334,10 @@
       if (auto OldInterruptFunction = InterruptFunction.exchange(nullptr))
         return OldInterruptFunction();
 
+      // Send a special return code that drivers can check for.
+      if (Sig == SIGPIPE)
+        exit(71);
+
       raise(Sig);   // Execute the default handler.
       return;
    }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53000.168715.patch
Type: text/x-patch
Size: 496 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181008/80332641/attachment.bin>


More information about the llvm-commits mailing list