[PATCH] D53001: [Driver] check for exit code from SIGPIPE

JF Bastien via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 8 15:58:55 PDT 2018


jfb added inline comments.


================
Comment at: lib/Driver/Driver.cpp:1406
+    // for SIGPIPE. Do not print diagnostics for this case.
+    if (Res == 71)
+      continue;
----------------
nickdesaulniers wrote:
> jfb wrote:
> > jfb wrote:
> > > Ditto on magical number in a header.
> > I think you want to create a new diagnostic here for "broken pipe" before the `continue`.
> Won't the diagnostic always be printed then? I thought we were trying to silence all related warnings?
It is an error that I think we want to report, but we don't want to ask for a bug report. So I think we want to avoid printing the long bug report error message, but we want to say "Broken pipe" which seems to be the standard Unix thing to do.

Not my area of expertise though, maybe someone has a different opinion?


Repository:
  rC Clang

https://reviews.llvm.org/D53001





More information about the cfe-commits mailing list