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,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF 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 9B0E01F55F for ; Tue, 26 Sep 2023 07:44:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1695714280; bh=ooea/sSA1XQMzzGT8DjgL8WArTaDFI91ZpsuPM/133o=; h=From:To:Subject:Date:From; b=H7nqa82nBO3FCo6VVlYTCniOZdj6gkPEfGbqBQkT1IjNsjVOMYBZ2bsHk9CZBl5xH MTfOkJBIZWRLp/bSnde+SmlZCDnqLnzw/qTCGs48FPeydqs7LOPk55GQLS5mR905ZF Hf2OE3H/Lf33/t7dRAtt29e3y01o6ayGi+bUQvnI= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 0/6] waitpid-related cleanups Date: Tue, 26 Sep 2023 07:44:34 +0000 Message-ID: <20230926074440.392023-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Mainly, much of our code was too noisy and guarding for waitpid error cases which never happen. Perl `waitpid' will always retry on EINTR (cf. perlipc(1)) and it never returns `undef' on error, only -1. I don't understand why Perl does it this way, all other syscalls return `undef' on error, but Perl only documents -1 for errors and my understanding of the Perl sources says it can't return `undef'. So start working on reducing waitpid call sites... Eric Wong (6): ds: awaitpid: Perl waitpid retries on EINTR automatically auto_reap: waitpid never returns undef lei_blob: use ProcessPipe to eliminate a waitpid call fetch: fix missing chdir arg for error reporting spamcheck/spamc: rely on ProcessPipe instead of waitpid spawn: add run_wait to simplify spawn+waitpid use lib/PublicInbox/AutoReap.pm | 7 +++---- lib/PublicInbox/DS.pm | 9 +++------ lib/PublicInbox/Fetch.pm | 10 +++++----- lib/PublicInbox/LEI.pm | 5 ++--- lib/PublicInbox/LeiBlob.pm | 19 +++++++------------ lib/PublicInbox/LeiMailDiff.pm | 6 ++---- lib/PublicInbox/LeiMirror.pm | 8 +++----- lib/PublicInbox/LeiRediff.pm | 7 +++---- lib/PublicInbox/SearchIdx.pm | 6 ++---- lib/PublicInbox/Spamcheck/Spamc.pm | 11 ++++------- lib/PublicInbox/Spawn.pm | 13 +++++++++---- lib/PublicInbox/TestCommon.pm | 6 +----- 12 files changed, 44 insertions(+), 63 deletions(-) More deletions than insertions is good.