in reply to How to Trap exit code from system calls
Because system() and backticks block SIGINT and SIGQUIT, killing the p +rogram they're running doesn't actually interrupt your program. @args = ("command", "arg1", "arg2"); system(@args) == 0 or die "system @args failed: $?" You can check all the failure possibilities by inspecting $? like this +: $exit_value = $? >> 8; $signal_num = $? & 127; $dumped_core = $? & 128;
- Tom
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: How to Trap exit code from system calls
by emjga1 (Novice) on Jan 22, 2004 at 11:02 UTC |