Query: proc::waitstat
OS: debian
Section: 3pm
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
WaitStat(3pm) User Contributed Perl Documentation WaitStat(3pm)NAMEProc::WaitStat - Interpret and act on wait() status valuesSYNOPSIS$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. waitstat wait-status Returns a string representation of wait() status value wait-status. Values returned are like "0" and "64" and "killed (SIGHUP)". This function is prototyped to take a single scalar argument. waitstat_reuse wait-status Turn wait-status into a value which can be passed to exit, converted in the same manner the shell uses. If wait-status indicates a normal exit, return the exit value. If wait-status instead indicates death by signal, return 128 plus the signal number. This function is prototyped to take a single scalar argument. waitstat_die wait-status program-name die() if wait-status is non-zero (mentioning program-name as the source of the error). This function is prototyped to take two scalar arguments. close_die filehandle name Close filehandle, if that fails die() with an appropriate message which refers to name. This handles failed closings of both programs and files properly. This function is prototyped to take a filehandle (actually, a glob ref) and a scalar.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: ", $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). perl v5.8.8 1999-10-27 WaitStat(3pm)
Related Man Pages |
---|
wait(3c) - opensolaris |
wait(1) - sunos |
wait.h(3head) - sunos |
wait(1) - php |
proc::waitstat(3pm) - debian |
Similar Topics in the Unix Linux Community |
---|
status of perl script in another ... |
grep the line only if next line matches |
Hi from ngungo |
Log files |
%wait nmon CPU-UTILISATION |