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 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 341131F406 for ; Fri, 27 Oct 2023 22:21:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1698445276; bh=60bmlMeMyhcPEs9Hhp4d9s2a/TNLDvfM1EaKS2KuMg4=; h=From:To:Subject:Date:From; b=5NR6RYUhfhrk0qvSPhIS1529+FagMMPNKtzAzV8oSH8roe04HBPXDnbfVnaIINLWu oqBSPH75Z3fcyju6UWZs0zIx4vHTRLsd7lSCZsLZ9GjZHhzh8M8NzS5frV6tOcYMSk mokrg0moJv/N7LhHbZT5ejtKudLPuA3YdhCLvewM= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 00/10] first steps towards eliminating TIEHANDLE Date: Fri, 27 Oct 2023 22:21:06 +0000 Message-ID: <20231027222116.4034363-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: ProcessIO being tied is problematic since perlops like stat and fcntl don't work directly on the handle, and we need separate classes to do buffered read and unbuffered sysread. It's possible to do as common packages (e.g. File::Temp, IO::Socket::IP, IO::Socket::SSL) do by subclassing IO::Handle to avoid tie completely. I also want to avoid the self-tie thing IO::Socket::SSL to avoid having to rely on weaken(). So, this essentially becomes a war on `close($fh)' an relying on $fh->close where appropriate. This loses some usefulness of autodie, so we keep `close($fh)' for places which aren't tied at the moment. One key place is to replace many calls to popen_rd with the new run_qx to consolidate close calls. There's also few other cleanups, code reductions, and safety improvements along the way. And more changes coming. Eric Wong (10): spawn: croak directly in C pi_fork_exec spawnpp: use autodie for syscall failures spawn: avoid alloca in C pi_fork_exec git: use run_qx to read `git --version' git: avoid extra stat(2) for git version gcf2: simplify pkg-config and Inline::C setup treewide: use run_qx where appropriate www_altid: reduce FD pressure in qspawn queues xt/eml_check_limits: remove useless import lei_ale: use v5.12, autodie, and try_cat lib/PublicInbox/Admin.pm | 7 ++--- lib/PublicInbox/Config.pm | 14 ++++----- lib/PublicInbox/Fetch.pm | 7 ++--- lib/PublicInbox/Gcf2.pm | 27 +++++----------- lib/PublicInbox/Git.pm | 15 +++++---- lib/PublicInbox/Import.pm | 6 ++-- lib/PublicInbox/LEI.pm | 7 ++--- lib/PublicInbox/LeiALE.pm | 24 +++++++-------- lib/PublicInbox/LeiBlob.pm | 12 +++----- lib/PublicInbox/LeiMirror.pm | 7 ++--- lib/PublicInbox/MultiGit.pm | 7 ++--- lib/PublicInbox/Spamcheck/Spamc.pm | 11 ++----- lib/PublicInbox/Spawn.pm | 49 +++++++++++++++--------------- lib/PublicInbox/SpawnPP.pm | 10 +++--- lib/PublicInbox/WwwAltId.pm | 9 ++---- lib/PublicInbox/XapHelperCxx.pm | 11 ++----- t/solver_git.t | 12 +++----- xt/eml_check_limits.t | 4 +-- 18 files changed, 94 insertions(+), 145 deletions(-)