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 A8C2E1F4B4 for ; Sat, 2 Jan 2021 09:13:44 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 0/6] process pipe improvements Date: Fri, 1 Jan 2021 19:13:38 -1400 Message-Id: <20210102091344.13477-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: The DS::in_loop clobbering in MboxReader annoyed me and drove this series. I wanted to do it for the bidirectional pipes with "git cat-file --batch", too, but there seems to be some lifetime management issues which get hard-to-control with things like the the waitpid(..,WNOHANG) call in GitAsyncCat. Maybe switching --batch + DS to use UNIX sockets can be done to save FDs (or I'm too brain-damaged to figure this out). But right now, all of our codebase is robust against children attempting to reap siblings (or PIDs of former siblings) Eric Wong (6): processpipe: allow synchronous close to set $? processpipe: lazy-require PublicInbox::DS for dwaitpid git: qx: waitpid synchronously via ProcessPipe->CLOSE import: switch to using ProcessPipe git: manifest_entry: use ProcessPipe via popen_rd qspawn: switch to ProcessPipe via popen_rd lib/PublicInbox/Git.pm | 20 +++++++++----- lib/PublicInbox/Import.pm | 23 +++++++--------- lib/PublicInbox/MboxReader.pm | 3 --- lib/PublicInbox/ProcessPipe.pm | 49 +++++++++++++++++++++------------- lib/PublicInbox/Qspawn.pm | 15 +++++------ lib/PublicInbox/Spawn.pm | 10 +++---- t/mbox_reader.t | 17 ++++++++++++ t/spawn.t | 38 ++++++++++++++++++++++++++ 8 files changed, 119 insertions(+), 56 deletions(-)