The following snipet of code , works fine
But how can I trap the exit code of the program check_nrpe
Which could be 0 , 1 , 2 or 254
I think I should be using fork or waitpidopen(CMD, "/local/nagios/libexec/check_nrpe -H $host|") or dir $!; @CMD=<CMD>; close(CMD);
Thanks
Matt
In reply to How to Trap exit code from system calls by emjga1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |