nnn

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit f1dbb9622d7f4f3b18fcb61654fb6843e2f66b7b
parent 0db988b9b2340dcca138195d8c30570dad173f0e
Author: Arun Prakash Jana <engineerarun@gmail.com>
Date:   Sat, 24 Jul 2021 22:21:21 +0530

Open controlling terminal only as stdin

Diffstat:
Msrc/nnn.c | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/nnn.c b/src/nnn.c @@ -8226,8 +8226,7 @@ int main(int argc, char *argv[]) /* 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