diff options
author | wm4 <wm4@nowhere> | 2013-11-06 20:28:23 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-11-07 23:58:56 +0100 |
commit | 96532916fe7969ffa2f963edd3f66fae5169a493 (patch) | |
tree | 2758cd9aba41af6a2be34dbb5593eeca2e27d2ab | |
parent | c265855d445873d55b6d4aa7ade19715f61dbaca (diff) | |
download | mpv-96532916fe7969ffa2f963edd3f66fae5169a493.tar.bz2 mpv-96532916fe7969ffa2f963edd3f66fae5169a493.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.
-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 ba474ea51a..ed2caecb20 100644 --- a/osdep/getch2.c +++ b/osdep/getch2.c @@ -561,6 +561,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(); @@ -577,6 +578,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(); |