X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=pager.c;h=0b7e55f476ac17609d88821e78bd89a511f4b3aa;hb=2454ac7b9fbc12db5cca8cd388422360528d7d6f;hp=6b5c9e44b4ded338ddb344ae454d83a685b7569a;hpb=e9a9d6edeeafa53a203c7ae379373af5394d4fde;p=git.git diff --git a/pager.c b/pager.c index 6b5c9e44b..0b7e55f47 100644 --- a/pager.c +++ b/pager.c @@ -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 */