Commit 2803160c authored by Alessandro Rubini's avatar Alessandro Rubini

wr_mon: don't use nonblocking input

For unknown reasons, setting stdin to nonblocking mode has global
effects, and thus every later command will get EAGAIN instead
of a blocking read:

   vi: can't read user input

   wrs-192.168.16.242#cat
   cat: read error: Resource temporarily unavailable

But wr_mon doesn't need non-blocking mode, because it uses poll on stdin.
So instead of fixing, remove the source of the bug.
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 56e00c1a
......@@ -24,7 +24,6 @@ void term_init(int usecolor)
if (!isatty(STDIN_FILENO) || !isatty(STDOUT_FILENO))
return;
fcntl(STDIN_FILENO, F_SETFL, O_NONBLOCK);
tcgetattr(STDIN_FILENO,&oldkey);
newkey = oldkey;
cfmakeraw(&newkey);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment