From d445147be9abe51c5ed462a878c7d50d97d4b98e Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 6 Nov 2013 20:28:23 +0100 Subject: osdep: handle SIGTERM There's no reason why we should e.g. handle SIGQUIT, but not SIGTERM. Note that sending SIGTERM twice still kills the player. --- osdep/getch2.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'osdep') diff --git a/osdep/getch2.c b/osdep/getch2.c index e3b1179fdf..ccfef64ac0 100644 --- a/osdep/getch2.c +++ b/osdep/getch2.c @@ -553,6 +553,7 @@ void getch2_enable(void){ setsigaction(SIGTSTP, stop_sighandler, SA_RESETHAND, false); setsigaction(SIGINT, quit_request_sighandler, SA_RESETHAND, false); setsigaction(SIGQUIT, quit_request_sighandler, SA_RESETHAND, false); + setsigaction(SIGTERM, quit_request_sighandler, SA_RESETHAND, false); setsigaction(SIGTTIN, SIG_IGN, 0, true); do_activate_getch2(); @@ -569,6 +570,7 @@ void getch2_disable(void){ setsigaction(SIGTSTP, SIG_DFL, 0, false); setsigaction(SIGINT, SIG_DFL, 0, false); setsigaction(SIGQUIT, SIG_DFL, 0, false); + setsigaction(SIGTERM, SIG_DFL, 0, false); setsigaction(SIGTTIN, SIG_DFL, 0, false); do_deactivate_getch2(); -- cgit v1.2.3