From c3f140033c531e9c5eae920c16fe2ecc80faa1a2 Mon Sep 17 00:00:00 2001 From: tcatm Date: Wed, 23 Mar 2011 18:27:30 +0100 Subject: [PATCH] catch SIGINT, SIGHUP and SIGSEGV and shutdown cleanly --- init.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/init.cpp b/init.cpp index c0b03c877..071d254eb 100644 --- a/init.cpp +++ b/init.cpp @@ -120,6 +120,9 @@ bool AppInit2(int argc, char* argv[]) sigemptyset(&sa.sa_mask); sa.sa_flags = 0; sigaction(SIGTERM, &sa, NULL); + sigaction(SIGINT, &sa, NULL); + sigaction(SIGHUP, &sa, NULL); + sigaction(SIGSEGV, &sa, NULL); #endif //