|
|
| Keep It Simple, Stupid | |
| PerlMonks |
Re: zcat pipe gives "gzip: stdout: Broken pipe" errorby ikegami (Patriarch) |
| on Mar 26, 2025 at 14:17 UTC ( [id://11164442]=note: print w/replies, xml ) | Need Help?? |
|
Difference: Your large program uses $SIG{ PIPE } = "IGNORE";. Solution: Add local $SIG{ PIPE } = "DEFAULT"; in scope of your open. Alternatively, you could redirect zcat's STDERR to /dev/null. Take a look at this:
It should take a long time to generate and unzip that stream, but it doesn't.
This is what happens:
The above is what happens in your standalone script. In your larger program, you appear to have used $SIG{ PIPE } = "IGNORE";. It's still just as quick, but the error message now appears.
This is what happens now:
Add local $SIG{ PIPE } = "DEFAULT"; in scope of your open.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||||||