Handle broken pipes more gracefully - #445
Conversation
|
|
I rather wish to avoid unsafe code, as well as adding another (direct) dependency to |
|
I don't think thread-safe wrapper for signal is possible. (It should be used by uutils already if such wrapper is possible...)
|
Perhaps, but jaq does not use multiple threads, so do you think that this is relevant in this case? |
|
External crates or C libs might use threads. I'm not sure, but is signal on top of main() safe?
|
To be honest, I do not know. Problematic places could be filters like |
This handles broken pipes as reported in #444:
It would be nice to unify at least two of the three broken pipe checks in the code, though ...
But this is hard, given that error printing code can fail with
SIGPIPEas well ...