From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 241231F461 for ; Fri, 1 Dec 2023 02:07:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1701396426; bh=N4apo4tHm6ww9P6Es8GuXOhQIf5iHifxyzdTjnqwgxE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=SugkFDzk+krkxQNGzfBU/XyIeAnlfXC2Ep7MEJY3HCe6exSSDa2/92ayQ4LlQR8um 18jX0jZW71bFTKbf6cioS3uOL//TuL0eHItYKc2FOSe58r8UgxKzeX47166qDA9koF XyqHKkkdGsMVV0mr6dz6XpNPszEi5NUVSCyevezI= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 2/4] xap_helper.h: fix non-assignable stderr case Date: Fri, 1 Dec 2023 02:07:03 +0000 Message-ID: <20231201020705.2752562-3-e@80x24.org> In-Reply-To: <20231201020705.2752562-1-e@80x24.org> References: <20231201020705.2752562-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: I mixed up "flush" with "close" :x Fixes: 87b7f633f241 (xap_helper: implement mset endpoint for WWW, IMAP, etc...) --- lib/PublicInbox/xap_helper.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/xap_helper.h b/lib/PublicInbox/xap_helper.h index 18665567..c1ab66f3 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);