-
-
Notifications
You must be signed in to change notification settings - Fork 39
Spurious "broken pipe" error #25
Comments
This is due to C-based programs typically just get killed off with a SIGPIPE, but Rust ignores that signal. |
Do you mean the other way around? It seems rust isn't ignoring that signal here, whereas a simple 3 x hello-world program C program does this:
Anyway, should I file this as a Rust bug then? For command-line "single-output" programs, it is surprising behaviour, and I guess that's why C defaults to ignoring it. But arguably it's useful to raise the error for long-running processes who's using the pipe for IPC. |
It's not all rust programs that are affected - a 3-line hello-world rust example also doesn't fail:
Some other rust programs also seem OK:
|
Three "hello"s fit into the kernel-side buffer for the pipe, so |
Filed in rust, so closing. |
Can be suppressed with
2>/dev/null
but this also suppresses any other errors, and other UNIX tools don't need this.The text was updated successfully, but these errors were encountered: