diff options
author | wm4 <wm4@nowhere> | 2013-11-06 20:28:23 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-11-06 20:29:16 +0100 |
commit | d445147be9abe51c5ed462a878c7d50d97d4b98e (patch) | |
tree | e8f56e72c5a412771ddac3e22ecef1be1b5f6670 /osdep | |
parent | ac01e6a14705c8d747d9ce5e2282c134bc9293de (diff) | |
download | mpv-d445147be9abe51c5ed462a878c7d50d97d4b98e.tar.bz2 mpv-d445147be9abe51c5ed462a878c7d50d97d4b98e.tar.xz |
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.
Diffstat (limited to 'osdep')
-rw-r--r-- | osdep/getch2.c | 2 |
1 files changed, 2 insertions, 0 deletions
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(); |