diff options
-rw-r--r-- | pager.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -102,7 +102,8 @@ void setup_pager(void) /* original process continues, but writes to the pipe */ dup2(pager_process.in, 1); - dup2(pager_process.in, 2); + if (isatty(2)) + dup2(pager_process.in, 2); close(pager_process.in); /* this makes sure that the parent terminates after the pager */ |