From: Tobias Stoeckmann Date: Wed, 4 Feb 2026 19:42:59 +0000 (+0100) Subject: lib/pager: Clear potential stdout/stderr errors X-Git-Tag: v2.43-devel~89^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b6816b60d9ed9ad04030b492f9bfa03ae40fc9ea;p=thirdparty%2Futil-linux.git lib/pager: Clear potential stdout/stderr errors Clear stdout/stderr errors which might have occurred in communication with pager. Since output is flushed and file descriptors replaced, the information is meaningless. Signed-off-by: Tobias Stoeckmann --- diff --git a/lib/pager.c b/lib/pager.c index 11d56c1b8..4fe61ffa2 100644 --- a/lib/pager.c +++ b/lib/pager.c @@ -274,7 +274,9 @@ void pager_close(void) _exit(EXIT_FAILURE); /* restore original output */ + clearerr(stdout); dup2(pager_process.org_out, STDOUT_FILENO); + clearerr(stderr); dup2(pager_process.org_err, STDERR_FILENO); close(pager_process.org_out);