Don't ask to ask, just ask | |
PerlMonks |
Re^5: how to properly handle the closing of pipe? read from the pipe unzip-c and get out beforeby Illuminatus (Curate) |
on Mar 29, 2011 at 19:23 UTC ( [id://896261]=note: print w/replies, xml ) | Need Help?? |
Another check of the unzip man page yields the likely reason for your problem. Closing a pipe causes the writer (unzip in this case) to receive SIGPIPE. unzip subsequently returns a non-zero exit status (sets $? to SIGPIPE, or 13), which may be causing croak to fire. You may want to change you logic to not croak if the close fails, but $? is set to 13 fnord
In Section
Seekers of Perl Wisdom
|
|