From: Scott Sanders Date: Fri, 19 Sep 2014 14:31:18 +0000 (-0400) Subject: Bit shift right by 8 to get return code from exit status X-Git-Tag: collectd-5.3.2~31 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=714522febc688863012fc71149dcda4a36214e9e;p=collectd.git Bit shift right by 8 to get return code from exit status Pull-Request: #741 Signed-off-by: Florian Forster --- diff --git a/contrib/exec-nagios.px b/contrib/exec-nagios.px index c7f18c58..ec13b0a0 100755 --- a/contrib/exec-nagios.px +++ b/contrib/exec-nagios.px @@ -442,7 +442,7 @@ sub execute_script close ($fh); # Save the exit status of the check in $state - $state = $?; + $state = $? >> 8; if ($state == 0) {