Commit f094939f authored by Eric Cano's avatar Eric Cano
Browse files

Fixed missing cleanup in maintenance handler.

This triggered the killing of the maintenance process by a sibling which had an unhandled exception and
hence called the destructor of the MaintenanceHandler. Usual use case sees an exit instead with no
full stack unwinding.
parent 02e6a12d
......@@ -62,6 +62,8 @@ void MaintenanceHandler::postForkCleanup() {
// We are in the child process of another handler. We can close our socket pair
// without re-registering it from poll.
// We forget about our child process which is not handled by siblings.
m_pid = -1;
......@@ -370,7 +372,7 @@ MaintenanceHandler::~MaintenanceHandler() {
cta::log::ScopedParamContainer params(m_processManager.logContext());
params.add("pid", m_pid);
::kill(m_pid, SIGKILL);
m_processManager.logContext().log(log::WARNING, "In MaintenanceHandler::~GarbageCollectorHandler(): killed leftover subprocess");
m_processManager.logContext().log(log::WARNING, "In MaintenanceHandler::~MaintenanceHandler(): killed leftover subprocess");
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment