Merge pull request #18616 from ClickHouse/watchdog-exit-code-fix

Fixed exit code of watchdog
This commit is contained in:
alexey-milovidov 2020-12-30 16:34:05 +03:00 committed by GitHub
commit e0202b3b81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -962,7 +962,7 @@ void BaseDaemon::setupWatchdog()
if (WIFEXITED(status))
{
logger().information(fmt::format("Child process exited normally with code {}.", WEXITSTATUS(status)));
_exit(status);
_exit(WEXITSTATUS(status));
}
if (WIFSIGNALED(status))
@ -980,7 +980,7 @@ void BaseDaemon::setupWatchdog()
logger().fatal(fmt::format("Child process was terminated by signal {}.", sig));
if (sig == SIGINT || sig == SIGTERM || sig == SIGQUIT)
_exit(status);
_exit(128 + sig);
}
}
else