summaryrefslogtreecommitdiffstats
path: root/osdep
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-12-19 21:31:33 +0100
committerwm4 <wm4@nowhere>2013-12-19 21:31:33 +0100
commit833eba5304474392153189f3cc6b7baa8eb914cc (patch)
treef2536424fe762c7d9c98f52633d8f0a8752b4511 /osdep
parent25d4ae74f1dbddf99b147df0887d6810d34e36dd (diff)
downloadmpv-833eba5304474392153189f3cc6b7baa8eb914cc.tar.bz2
mpv-833eba5304474392153189f3cc6b7baa8eb914cc.tar.xz
terminal: move SIGTTOU signal handler setup code
This comes with a real change in behavior: now the signal handler is set only when the terminal input code is active (e.g. not with --no-consolecontrols), but this should be ok.
Diffstat (limited to 'osdep')
-rw-r--r--osdep/terminal-unix.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/osdep/terminal-unix.c b/osdep/terminal-unix.c
index 583ab162eb..050b97b9d1 100644
--- a/osdep/terminal-unix.c
+++ b/osdep/terminal-unix.c
@@ -554,6 +554,7 @@ void getch2_enable(void){
setsigaction(SIGQUIT, quit_request_sighandler, SA_RESETHAND, false);
setsigaction(SIGTERM, quit_request_sighandler, SA_RESETHAND, false);
setsigaction(SIGTTIN, SIG_IGN, 0, true);
+ setsigaction(SIGTTOU, SIG_IGN, 0, true);
do_activate_getch2();
@@ -571,6 +572,7 @@ void getch2_disable(void){
setsigaction(SIGQUIT, SIG_DFL, 0, false);
setsigaction(SIGTERM, SIG_DFL, 0, false);
setsigaction(SIGTTIN, SIG_DFL, 0, false);
+ setsigaction(SIGTTOU, SIG_DFL, 0, false);
do_deactivate_getch2();