mirror of
https://github.com/git/git.git
synced 2026-03-13 10:23:30 +01:00
Send stderr of commands to the pager.
This is a follow-up to 61b80509e3.
Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
This commit is contained in:
6
pager.c
6
pager.c
@@ -34,7 +34,10 @@ static struct child_process pager_process = {
|
||||
static void wait_for_pager(void)
|
||||
{
|
||||
fflush(stdout);
|
||||
close(1); /* signals EOF to pager */
|
||||
fflush(stderr);
|
||||
/* signal EOF to pager */
|
||||
close(1);
|
||||
close(2);
|
||||
finish_command(&pager_process);
|
||||
}
|
||||
#endif
|
||||
@@ -99,6 +102,7 @@ void setup_pager(void)
|
||||
|
||||
/* original process continues, but writes to the pipe */
|
||||
dup2(pager_process.in, 1);
|
||||
dup2(pager_process.in, 2);
|
||||
close(pager_process.in);
|
||||
|
||||
/* this makes sure that the parent terminates after the pager */
|
||||
|
||||
Reference in New Issue
Block a user