From 5925e17f1b6a455b622f802952b2f1a552a8b9b5 Mon Sep 17 00:00:00 2001 From: Philippe PITTOLI Date: Sun, 28 Oct 2018 18:15:55 +0100 Subject: [PATCH] pongd handles SIGINT now --- pong/app/pongd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pong/app/pongd.c b/pong/app/pongd.c index 2fde110..ec891cb 100644 --- a/pong/app/pongd.c +++ b/pong/app/pongd.c @@ -113,7 +113,7 @@ void exit_program(int signal) /* * service ping-pong: send back everything sent by the clients - * stop the program on SIGTERM, SIGALRM, SIGUSR{1,2}, SIGHUP signals + * stop the program on SIG{TERM,INT,ALRM,USR{1,2},HUP} signals */ int main(int argc, char * argv[], char **env) @@ -146,6 +146,7 @@ int main(int argc, char * argv[], char **env) signal (SIGUSR1, exit_program); signal (SIGUSR2, exit_program); signal (SIGTERM, exit_program); + signal (SIGINT, exit_program); // the service will loop until the end of time, or a signal main_loop ();