src/nnn.c | 3 +-- diff --git a/src/nnn.c b/src/nnn.c index e409d708085a69040749488e583e601431d85569..cae77ef82f70da9ca781a9ceaea5c45d3d0ebf24 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -8226,8 +8226,7 @@ return EXIT_FAILURE; /* We return to tty */ if (!isatty(STDOUT_FILENO)) { - fd = open(ctermid(NULL), O_RDWR, 0400); - dup2(fd, STDOUT_FILENO); + fd = open(ctermid(NULL), O_RDONLY, 0400); dup2(fd, STDIN_FILENO); close(fd); } else