From 43d0446323028d7879167a2d3a3c71b4ec2b8a90 Mon Sep 17 00:00:00 2001 From: Johannes Sixt Date: Tue, 26 Feb 2008 10:43:45 +0100 Subject: [PATCH] Send stderr of commands to the pager. This is a follow-up to 61b80509e3323c262ed5c45d5340cfa278521a71. Signed-off-by: Johannes Sixt --- pager.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pager.c b/pager.c index bcb3d7f69d..3f7f8c123e 100644 --- a/pager.c +++ b/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 */