Closed KatrionaGoldmann closed 10 months ago
Digging into this more deeply, you can't even catch the exception and call exit
, because exit
causes stdout/stderr to be flushed and this flushing triggers the broken pipe error again.
The opam
tool has handled this before: https://github.com/ocaml/opam/issues/4216
And the associated PR is probably a good reference of how to fix it: https://github.com/ocaml/opam/pull/4901 The strategy, it seems, is to silently flush stdout and stderr before exiting.
Using
whatwhat person ... | head
returns an error:Suspected cause is due to broken pipe signal (see SO question)
We probably want to catch this exception and ignore the error