mirror of https://github.com/Icinga/icinga2.git
Merge pull request #8937 from Icinga/bugfix/timeout-always-unknown
Override exit code on process timeout
This commit is contained in:
commit
cc8d3fbedd
lib/base
|
@ -1133,8 +1133,14 @@ bool Process::DoEvents()
|
||||||
} else if (WIFEXITED(status)) {
|
} else if (WIFEXITED(status)) {
|
||||||
exitcode = WEXITSTATUS(status);
|
exitcode = WEXITSTATUS(status);
|
||||||
|
|
||||||
Log(LogNotice, "Process")
|
Log msg(LogNotice, "Process");
|
||||||
<< "PID " << m_PID << " (" << PrettyPrintArguments(m_Arguments) << ") terminated with exit code " << exitcode;
|
msg << "PID " << m_PID << " (" << PrettyPrintArguments(m_Arguments)
|
||||||
|
<< ") terminated with exit code " << exitcode;
|
||||||
|
|
||||||
|
if (m_SentSigterm) {
|
||||||
|
exitcode = 128;
|
||||||
|
msg << " after sending SIGTERM";
|
||||||
|
}
|
||||||
} else if (WIFSIGNALED(status)) {
|
} else if (WIFSIGNALED(status)) {
|
||||||
int signum = WTERMSIG(status);
|
int signum = WTERMSIG(status);
|
||||||
const char *zsigname = strsignal(signum);
|
const char *zsigname = strsignal(signum);
|
||||||
|
|
Loading…
Reference in New Issue