emjga1 has asked for the wisdom of the Perl Monks concerning the following question:
Dear Monks
but not sure how ?.
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);
but not sure how ?.
Thanks
Matt
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: How to Trap exit code from system calls
by Abigail-II (Bishop) on Jan 21, 2004 at 16:10 UTC | |
Re: How to Trap exit code from system calls
by Fletch (Bishop) on Jan 21, 2004 at 16:12 UTC | |
Re: How to Trap exit code from system calls
by tcf22 (Priest) on Jan 21, 2004 at 15:59 UTC | |
by emjga1 (Novice) on Jan 22, 2004 at 11:02 UTC | |
Re: How to Trap exit code from system calls
by geektron (Curate) on Jan 21, 2004 at 16:00 UTC |
Back to
Seekers of Perl Wisdom