mirror of
https://github.com/mpv-player/mpv
synced 2025-02-03 21:52:12 +00:00
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.
This commit is contained in:
parent
ac01e6a147
commit
d445147be9
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user