Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^2: zcat pipe gives "gzip: stdout: Broken pipe" error

by NERDVANA (Priest)
on Mar 26, 2025 at 14:51 UTC ( [id://11164443]=note: print w/replies, xml ) Need Help??


in reply to Re: zcat pipe gives "gzip: stdout: Broken pipe" error
in thread zcat pipe gives "gzip: stdout: Broken pipe" error

Wow, I did not know signal disposition could persist across an exec(). TIL...
  • Comment on Re^2: zcat pipe gives "gzip: stdout: Broken pipe" error

Replies are listed 'Best First'.
Re^3: zcat pipe gives "gzip: stdout: Broken pipe" error
by ikegami (Patriarch) on Mar 26, 2025 at 16:59 UTC

    Linux's https://man7.org/linux/man-pages/man2/execve.2.html says:

    All process attributes are preserved during an execve(), except the following:

    • The dispositions of any signals that are being caught are reset to the default (signal(7)).

    • [...]

    So a caught signal such as $SIG{ PIPE } = \&handler; gets reset to $SIG{ PIPE } = "DEFAULT";, but not $SIG{ PIPE } = "IGNORE";.

    Most if not all reset things are out of necessity. $SIG{ PIPE } = \&handler can't be kept since &handler will stop existing.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11164443]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2026-02-11 13:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.