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:
wm4 2014-09-09 21:13:28 +02:00
parent 28fc13977e
commit 49a0b61880
1 changed files with 1 additions and 1 deletions

View File

@ -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]},