![]() |
![]()
| ![]() |
![]()
NAMEProc::WaitStat - Interpret and act on wait() status values SYNOPSIS$description = waitstat $?; exit waitstat_reuse $?; waitstat_die $?, 'program-name'; close_die COMMAND, 'program-name'; DESCRIPTIONThis module contains functions for interpreting and acting on wait status values. Nothing is exported by default.
EXAMPLESclose SENDMAIL; exit if $? == 0; log "sendmail failure: ", waitstat $?; exit EX_TEMPFAIL; $pid == waitpid $pid, 0 or croak "Failed to reap $pid: $!"; exit waitstat_reuse $?; $output = `some-program -with args`; waitstat_die $?, 'some-program'; print "Output from some-process:\n", $output; open PROGRAM, '| post-processor' or die "Can't fork: $!"; while (<IN>) { print PROGRAM pre_process $_ or die "Error writing to post-processor: $!"; } # This handles both flush failures at close time and a non-zero exit # from the subprocess. close_die PROGRAM, 'post-processor'; AUTHORRoderick Schertler <roderick@argon.org> SEE ALSOperl(1), IPC::Signal(3pm).
|