From 49a0b61880692a07da1c6a370e6cc2eb39373d28 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 9 Sep 2014 21:13:28 +0200 Subject: 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. --- osdep/terminal-unix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]}, -- cgit v1.2.3