-
Notifications
You must be signed in to change notification settings - Fork 371
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Sys_error("Broken pipe") printed to console on opam list
#4216
Comments
This issue was initially submitted on the ocaml/ocaml/ bug tracker, but it's really related to how OPAM chooses to handle SIGPIPE. |
Indeed, apologies. Thanks for taking care of it. |
Ha, funnily enough, the reason the error code is 0 is that in this case the exception happens in the finaliser, which runs I am not sure what the better fix is: ensure to flush earlier ? Or just ignore the error once the |
I think we should flush earlier before hitting the finaliser. We should avoid doing anything in the finalisers that might potentially raise. Also in this case, the |
This issue is still there in 2.1.0~rc2 |
From my tests the return value is actually (you need to |
Restore the sigpipe handler before exiting, to prevent the finaliser from crashing on flushes. Closes ocaml#4216
Restore the sigpipe handler before exiting, to prevent the finaliser from crashing on flushes. Closes ocaml#4216
Will help merging ocaml#4901
Will help merging ocaml#4901
Will help merging ocaml#4901
Add some unix-only cram tests to test for #4216 before fixing it
Restore the sigpipe handler before exiting, to prevent the finaliser from crashing on flushes. Closes ocaml#4216
Restore the sigpipe handler before exiting, to prevent the finaliser from crashing on flushes. Closes ocaml#4216
…ixing it" This reverts commit ee3f569.
and re-add the test for ocaml#4216
and re-add the test for ocaml#4216
…ixing it" This reverts commit ee3f569.
and re-add the test for ocaml#4216
and re-add the test for ocaml#4216
Restore the sigpipe handler before exiting, to prevent the finaliser from crashing on flushes. Closes ocaml#4216
On
2.1.0~alpha
, pipingopam list
into a process that breaks the pipe causes a "Fatal error" message to be printed to the console. The exit code is 0 regardless.I would expect
opam
to handle aSIGPIPE
here with no error message.The text was updated successfully, but these errors were encountered: