X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=pager.c;h=f19ddbc87df04f117cd5e39189c8322fd5f29d68;hb=35fb0e8633217f602360a9987af51c4b960e7850;hp=aa0966c9c55566382bf32c946c0a1846f004125a;hpb=bc9c0248a5cf184756ba562d6c452cace8863517;p=git.git diff --git a/pager.c b/pager.c index aa0966c9c..f19ddbc87 100644 --- a/pager.c +++ b/pager.c @@ -70,7 +70,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 */