Page 1 of 1

[Nagios-devel] child exit status diff

Posted: Thu May 14, 2009 11:49 am
by Guest
This is a multi-part message in MIME format.
--------------000203050200030808040600
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

wondering if this was valid, posted to the list a while ago but didn't
get an answer.
diff attached.

--------------000203050200030808040600
Content-Type: text/x-patch;
name="utils.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="utils.diff"

--- utils.c 2009-01-26 10:49:49.000000000 +0200
+++ /tmp/utils.c 2009-02-12 18:19:25.000000000 +0200
@@ -531,10 +531,10 @@
if(status==-1)
result=STATE_CRITICAL;
else{
- if(WEXITSTATUS(status)==0 && WIFSIGNALED(status))
- result=128+WTERMSIG(status);
- result=WEXITSTATUS(status);
- }
+ if(WIFEXITED(status))
+ result=WEXITSTATUS(status);
+ else
+ result=STATE_UNKNOWN;
}

/* close pipe for writing */


--------------000203050200030808040600--





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]