From bf210be2b71f20c9b641aae029c970b87a9a4020 Mon Sep 17 00:00:00 2001 From: Max Lv Date: Tue, 28 Jun 2016 15:35:16 +0800 Subject: [PATCH] Refine #690 --- src/local.c | 1 + src/redir.c | 1 + src/tunnel.c | 1 + 3 files changed, 3 insertions(+) diff --git a/src/local.c b/src/local.c index 809c21de..947194f2 100644 --- a/src/local.c +++ b/src/local.c @@ -1192,6 +1192,7 @@ int main(int argc, char **argv) signal(SIGPIPE, SIG_IGN); signal(SIGABRT, SIG_IGN); signal(SIGINT, resolve_int_cb); + signal(SIGTERM, resolve_int_cb); #endif // Setup keys diff --git a/src/redir.c b/src/redir.c index 0aa642be..d3d8b0e3 100644 --- a/src/redir.c +++ b/src/redir.c @@ -853,6 +853,7 @@ int main(int argc, char **argv) signal(SIGPIPE, SIG_IGN); signal(SIGABRT, SIG_IGN); signal(SIGINT, signal_cb); + signal(SIGTERM, signal_cb); // Setup keys LOGI("initializing ciphers... %s", method); diff --git a/src/tunnel.c b/src/tunnel.c index 058f24bd..03933e97 100644 --- a/src/tunnel.c +++ b/src/tunnel.c @@ -897,6 +897,7 @@ int main(int argc, char **argv) signal(SIGPIPE, SIG_IGN); signal(SIGABRT, SIG_IGN); signal(SIGINT, signal_cb); + signal(SIGTERM, signal_cb); #endif // Setup keys