diff options
author | wm4 <wm4@nowhere> | 2014-09-09 21:13:28 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-09-10 00:48:12 +0200 |
commit | 49a0b61880692a07da1c6a370e6cc2eb39373d28 (patch) | |
tree | 03a2f65d1a8976af17930488c2fd0354442aae02 | |
parent | 28fc13977e740769d11b17165016559505187486 (diff) | |
download | mpv-49a0b61880692a07da1c6a370e6cc2eb39373d28.tar.bz2 mpv-49a0b61880692a07da1c6a370e6cc2eb39373d28.tar.xz |
terminal-unix: don't read from stdin if it's not a terminal
I'm not quite sure what we should actually do (maybe read input
commands?), but interpreting input as terminal key sequences is
definitely weird. So just do nothing.
-rw-r--r-- | osdep/terminal-unix.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/osdep/terminal-unix.c b/osdep/terminal-unix.c index a3cb82aa06..5c8e61ba78 100644 --- a/osdep/terminal-unix.c +++ b/osdep/terminal-unix.c @@ -756,7 +756,7 @@ static void quit_request_sighandler(int signum) static void *terminal_thread(void *ptr) { - bool stdin_ok = true; // if false, we still wait for SIGTERM + bool stdin_ok = isatty(STDIN_FILENO); // if false, we still wait for SIGTERM while (1) { struct pollfd fds[2] = { {.events = POLLIN, .fd = death_pipe[0]}, |