From bb1ad2dc1e3f5bf0f3c8aa8db8116eae233b14a0 Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Thu, 29 Nov 2018 08:12:28 -0500 Subject: [PATCH] handle SIGTERM --- daemon/main.cpp | 1 + llarp/context.cpp | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon/main.cpp b/daemon/main.cpp index 1f4e74099..2371f29c8 100644 --- a/daemon/main.cpp +++ b/daemon/main.cpp @@ -166,6 +166,7 @@ main(int argc, char *argv[]) if(ctx) { signal(SIGINT, handle_signal); + signal(SIGTERM, handle_signal); #ifndef _WIN32 signal(SIGHUP, handle_signal); #endif diff --git a/llarp/context.cpp b/llarp/context.cpp index 2e29e0227..64e65e76f 100644 --- a/llarp/context.cpp +++ b/llarp/context.cpp @@ -184,9 +184,8 @@ namespace llarp void Context::HandleSignal(int sig) { - if(sig == SIGINT) + if(sig == SIGINT || sig == SIGTERM) { - llarp::LogInfo("SIGINT"); SigINT(); } // TODO(despair): implement hot-reloading config on NT