diff -urp mc-4.6.0.orig/src/cons.saver.c mc-4.6.0/src/cons.saver.c --- mc-4.6.0.orig/src/cons.saver.c 2006-04-03 21:22:49.000000000 +0200 +++ mc-4.6.0/src/cons.saver.c 2006-04-03 21:26:53.000000000 +0200 @@ -90,7 +90,7 @@ static int check_file (char *filename, i /* Avoiding race conditions: use of fstat makes sure that both 'open' and 'stat' operate on the same file */ - fd = open (filename, O_RDWR); + fd = open (filename, O_RDWR | O_NONBLOCK); if (fd == -1) return -1; @@ -247,7 +247,7 @@ int main (int argc, char **argv) * Make sure stderr points to a valid place */ close (2); - stderr_fd = open ("/dev/tty", O_RDWR); + stderr_fd = open ("/dev/tty", O_RDWR | O_NONBLOCK); /* This may well happen if program is running non-root */ if (stderr_fd == -1)