=== modified file 'DBUS-API' --- DBUS-API 2015-08-02 16:57:09 +0000 +++ DBUS-API 2015-08-10 07:34:37 +0000 @@ -118,10 +118,10 @@ k) A raw byte array, not hexadecimal digits. ** Signals -*** CheckerCompleted(n: Exitcode, x: Signal, s: Command) +*** CheckerCompleted(n: Exitcode, x: Waitstatus, s: Command) A checker (Command) has completed. Exitcode is either the exit - code or -1 for abnormal exit, in which case, the signal number - is available. + code or -1 for abnormal exit. In any case, the full Waitstatus + (as from wait(2)) is also available. *** CheckerStarted(s: Command) A checker command (Command) has just been started. === modified file 'mandos' --- mandos 2015-08-02 16:57:09 +0000 +++ mandos 2015-08-10 07:34:37 +0000 @@ -1376,13 +1376,16 @@ if exitstatus >= 0: # Emit D-Bus signal self.CheckerCompleted(dbus.Int16(exitstatus), - dbus.Int64(0), + # This is specific to GNU libC + dbus.Int64(exitstatus << 8), dbus.String(command)) else: # Emit D-Bus signal self.CheckerCompleted(dbus.Int16(-1), dbus.Int64( - self.last_checker_signal), + # This is specific to GNU libC + (exitstatus << 8) + | self.last_checker_signal), dbus.String(command)) return ret === modified file 'mandos-monitor' --- mandos-monitor 2015-08-02 16:45:29 +0000 +++ mandos-monitor 2015-08-10 07:34:37 +0000 @@ -173,7 +173,7 @@ gobject.source_remove(self._update_timer_callback_tag) self._update_timer_callback_tag = None - def checker_completed(self, exitstatus, signal, command): + def checker_completed(self, exitstatus, condition, command): if exitstatus == 0: self.logger('Checker for client {} (command "{}")' ' succeeded'.format(self.properties["Name"], @@ -181,20 +181,16 @@ self.update() return # Checker failed - if exitstatus >= 0: + if os.WIFEXITED(condition): self.logger('Checker for client {} (command "{}") failed' ' with exit code {}' .format(self.properties["Name"], command, - exitstatus)) - elif signal != 0: + os.WEXITSTATUS(condition))) + elif os.WIFSIGNALED(condition): self.logger('Checker for client {} (command "{}") was' ' killed by signal {}' .format(self.properties["Name"], command, - signal)) - else: - self.logger('Checker for client {} completed' - ' mysteriously' - .format(self.properties["Name"])) + os.WTERMSIG(condition))) self.update() def checker_started(self, command):