[PATCH] main: The normal way to stop an application is to send SIGTERM, handle it

Holger Hans Peter Freyther hfreyther at sysmocom.de
Sat Mar 16 22:33:27 UTC 2013

From: Holger Hans Peter Freyther <zecke at selfish.org>

Make the code handle SIGTERM. This way the pcu can be easily stopped
with a sysvinit script.
 src/pcu_main.cpp |    1 +
 1 file changed, 1 insertion(+)

diff --git a/src/pcu_main.cpp b/src/pcu_main.cpp
index f135cfd..4fae14b 100644
--- a/src/pcu_main.cpp
+++ b/src/pcu_main.cpp
@@ -114,6 +114,7 @@ void sighandler(int sigset)
 	switch (sigset) {
 	case SIGINT:
+	case SIGTERM:
 		/* If another signal is received afterwards, the program
 		 * is terminated without finishing shutdown process.

More information about the osmocom-net-gprs mailing list