Make ProcessResult#ExitStatus and CheckResult#exit_status 64-bit ints

so that they can hold Windows exit codes like 3221225477 (>2147483647).
This commit is contained in:
Alexander A. Klimov 2024-03-25 11:53:57 +01:00
parent cb945feb19
commit e33befabfb
2 changed files with 5 additions and 2 deletions

View File

@ -5,6 +5,7 @@
#include "base/i2-base.hpp" #include "base/i2-base.hpp"
#include "base/dictionary.hpp" #include "base/dictionary.hpp"
#include <cstdint>
#include <iosfwd> #include <iosfwd>
#include <deque> #include <deque>
#include <vector> #include <vector>
@ -25,7 +26,7 @@ struct ProcessResult
pid_t PID; pid_t PID;
double ExecutionStart; double ExecutionStart;
double ExecutionEnd; double ExecutionEnd;
long ExitStatus; int_fast64_t ExitStatus;
String Output; String Output;
}; };

View File

@ -1,5 +1,7 @@
/* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */ /* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
#include <cstdint>
library icinga; library icinga;
namespace icinga namespace icinga
@ -50,7 +52,7 @@ class CheckResult
[state] Timestamp execution_end; [state] Timestamp execution_end;
[state] Value command; [state] Value command;
[state] int exit_status; [state] int_fast64_t exit_status;
[state, enum] ServiceState "state"; [state, enum] ServiceState "state";
[state, enum] ServiceState previous_hard_state; [state, enum] ServiceState previous_hard_state;