From: Eric Wong Date: Fri, 1 Dec 2023 02:07:03 +0000 (+0000) Subject: xap_helper.h: fix non-assignable stderr case X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a71ffab935d66cf2a985bc1c01540e721ea72e8;p=thirdparty%2Fpublic-inbox.git xap_helper.h: fix non-assignable stderr case I mixed up "flush" with "close" :x Fixes: 87b7f633f241 (xap_helper: implement mset endpoint for WWW, IMAP, etc...) --- diff --git a/lib/PublicInbox/xap_helper.h b/lib/PublicInbox/xap_helper.h index 186655674..c1ab66f3b 100644 --- a/lib/PublicInbox/xap_helper.h +++ b/lib/PublicInbox/xap_helper.h @@ -714,7 +714,7 @@ static void stderr_restore(FILE *tmp_err) stderr = orig_err; return; #endif - ERR_CLOSE(stderr, EXIT_FAILURE); + ERR_FLUSH(stderr); while (dup2(orig_err_fd, STDERR_FILENO) < 0) { if (errno != EINTR) err(EXIT_FAILURE, "dup2(%d => 2)", orig_err_fd);