evilsheep has asked for the wisdom of the Perl Monks concerning the following question:
Is there an alarm set in the background when you open(F...) or print F "blah"; or is this just an error that persists throughout all the documentation I have found?# add error processing as above $pid = open(KID_TO_WRITE, "|-"); $SIG{ALRM} = sub { die "whoops, $program pipe broke" }; if ($pid) { # parent for (@data) { print KID_TO_WRITE; } close(KID_TO_WRITE) || warn "kid exited $?"; } else { # child ($EUID, $EGID) = ($UID, $GID); exec($program, @options, @args) || die "can't exec program: $!"; # NOTREACHED }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: open(F, "|-") && SIG{ALRM}
by runrig (Abbot) on Aug 28, 2003 at 23:10 UTC | |
|
Re: open(F, "|-") && SIG{ALRM}
by edan (Curate) on Sep 01, 2003 at 09:05 UTC |