From e33befabfb87016f7caeda43314cd75cc27b6427 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Mon, 25 Mar 2024 11:53:57 +0100 Subject: [PATCH] Make ProcessResult#ExitStatus and CheckResult#exit_status 64-bit ints so that they can hold Windows exit codes like 3221225477 (>2147483647). --- lib/base/process.hpp | 3 ++- lib/icinga/checkresult.ti | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/base/process.hpp b/lib/base/process.hpp index d83ba6ee7..7cbcbe129 100644 --- a/lib/base/process.hpp +++ b/lib/base/process.hpp @@ -5,6 +5,7 @@ #include "base/i2-base.hpp" #include "base/dictionary.hpp" +#include #include #include #include @@ -25,7 +26,7 @@ struct ProcessResult pid_t PID; double ExecutionStart; double ExecutionEnd; - long ExitStatus; + int_fast64_t ExitStatus; String Output; }; diff --git a/lib/icinga/checkresult.ti b/lib/icinga/checkresult.ti index 09312dc12..bee2cbd0b 100644 --- a/lib/icinga/checkresult.ti +++ b/lib/icinga/checkresult.ti @@ -1,5 +1,7 @@ /* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */ +#include + library icinga; namespace icinga @@ -50,7 +52,7 @@ class CheckResult [state] Timestamp execution_end; [state] Value command; - [state] int exit_status; + [state] int_fast64_t exit_status; [state, enum] ServiceState "state"; [state, enum] ServiceState previous_hard_state;