From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 61A201F4B4 for ; Sun, 3 Jan 2021 11:24:55 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 0/2] fix race from stdout buffering in FD pass exit Date: Sun, 3 Jan 2021 11:24:49 +0000 Message-Id: <20210103112451.75313-1-e@80x24.org> In-Reply-To: <20210103094842.22906-1-e@80x24.org> References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: I implemented 1/2 thinking in hopes it would help, but it's a nice syscall reduction anyways. 2/2 is the actual fix I've been struggling to find, and I could only reproduce it on this FreeBSD VM I have access to. It seems so obvious in retrospect :x Eric Wong (2): send and receive all 3 FDs at once lei: fix output race in client/daemon mode lib/PublicInbox/LEI.pm | 33 +++++++++++++++---------- lib/PublicInbox/Spawn.pm | 53 ++++++++++++++++++++++++++-------------- script/lei | 6 ++--- t/lei.t | 2 +- t/spawn.t | 33 ++++++++++++++++--------- 5 files changed, 80 insertions(+), 47 deletions(-)