[PATCH] D142224: [Support] Emulate SIGPIPE handling in raw_fd_ostream write for Windows
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 2 13:06:22 PST 2023
mstorsjo added a comment.
In D142224#4099148 <https://reviews.llvm.org/D142224#4099148>, @andrewng wrote:
> In D142224#4097415 <https://reviews.llvm.org/D142224#4097415>, @mstorsjo wrote:
>
>> Also, while I kinda see what this does in a code level, can you describe what this changes from a user point of view - does some usecase behave differently?
>>
>> Half relatedly - I remember seeing some other discussion (I don’t have a reference handy right now) about changes to sigpipe handling; right now, if doing e.g. `clang -E | less`, you get a rather ugly crash for the clang process, if exiting less before the end of the clang output. (I remember seeing wishes to not treat this like a regular crash.)
>
> Yes, this patch addresses the issue you've described which is also mentioned in issue https://github.com/llvm/llvm-project/issues/48672 (although there it is `clang --help`).
Oh, sorry that I entirely missed the link in the review description. Then the purpose of the patch is much clearer!
This patch does indeed fix the issue for `clang --help`, but doesn't make any difference for `clang -E`. Do you happen to know how hard it would be to fix the same issue for `clang -E` too? (I've noticed that `clang -E | less` did show errors in clang 15.0 on unix too, but not in 14.0 and not in current git main.)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142224/new/
https://reviews.llvm.org/D142224
More information about the llvm-commits
mailing list