mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-26 21:00:21 +00:00
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.
This commit is contained in:
@@ -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]},
|
||||
|
||||
Reference in New Issue
Block a user