OSDN Git Service

[Support] exit with custom return code for SIGPIPE
authorNick Desaulniers <ndesaulniers@google.com>
Fri, 12 Oct 2018 17:22:07 +0000 (17:22 +0000)
committerNick Desaulniers <ndesaulniers@google.com>
Fri, 12 Oct 2018 17:22:07 +0000 (17:22 +0000)
commit2649515d3f3ba7deba9958fea4ef4b65132884a5
treed20bdb41d2d4b09280786ca67018c1e9d4628b0e
parentf0303e4307941c869627facd190e9bab1977baf0
[Support] exit with custom return code for SIGPIPE

Summary:
We tell the user to file a bug report on LLVM right now, and
SIGPIPE isn't LLVM's fault so our error message is wrong.

Allows frontends to detect SIGPIPE from writing to closed readers.
This can be seen commonly from piping into head, tee, or split.

Fixes PR25349, rdar://problem/14285346, b/77310947

Reviewers: jfb

Reviewed By: jfb

Subscribers: majnemer, kristina, llvm-commits, thakis, srhines

Differential Revision: https://reviews.llvm.org/D53000

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344372 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Support/Unix/Signals.inc