0

Please provide me a minimal Perl example which produces this error:

Unable to flush stdout: Broken pipe

See also Weird error after Perl upgrade: Unable to flush stdout

porton
  • 5,214
  • 11
  • 47
  • 95
  • Your linked question provides an example. Redirect STDOUT to a file, and reproduce the problem described in the link. – bytepusher Sep 02 '18 at 17:23
  • @bytepusher, Re "*Redirect STDOUT to a file*", You can't get `EPIPE` from writing to a file; you can only get it from writing to a pipe or socket. – ikegami Sep 02 '18 at 18:49
  • Fair enough! My comment is out of date anyhow given you've answered the question, but thanks for clearing that up :) – bytepusher Sep 02 '18 at 21:30
  • Sorry, I noticed it is indeed answered in https://stackoverflow.com/a/52139990/856090 – porton Sep 08 '18 at 14:03
  • `perl -e '$SIG{PIPE} = "IGNORE"; sleep(1); print "foo\n";' | echo -n` is the answer – porton Sep 08 '18 at 14:14

0 Answers0