From 52753e49c2cfc4ff1d7ec2afd2eb6be60b36cc1e Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 21 Feb 2017 17:54:31 +0100 Subject: [PATCH] hydra-evaluator: Handle SIGINT This makes "systemctl stop hydra-evaluator" work promptly again. --- src/hydra-evaluator/hydra-evaluator.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/hydra-evaluator/hydra-evaluator.cc b/src/hydra-evaluator/hydra-evaluator.cc index 3250e00e..5fa660fb 100644 --- a/src/hydra-evaluator/hydra-evaluator.cc +++ b/src/hydra-evaluator/hydra-evaluator.cc @@ -260,6 +260,9 @@ struct Evaluator void run() { + /* Can't be bothered to shut down cleanly. Goodbye! */ + auto callback = createInterruptCallback([&]() { std::_Exit(0); }); + std::thread reaperThread([&]() { reaper(); }); std::thread monitorThread([&]() { databaseMonitor(); });