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-ASN: 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 A8BA31F463 for ; Thu, 12 Sep 2019 08:34:21 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 0/2] tmpfile: new class to manage temporary files Date: Thu, 12 Sep 2019 08:34:19 +0000 Message-Id: <20190912083421.12629-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: In order to improve debugging experience when looking at lsof(8) output, create temporary files with useful names instead of relying on open(..., "+>", undef). We're going this route (instead of using File::Temp) since I need that retry logic to create temporary files with O_APPEND, anyways. And being able to encode the inode number of the associated socket is nice. Eric Wong (2): tmpfile: give temporary files meaningful names tmpfile: support O_APPEND and use it in DS::tmpio MANIFEST | 1 + lib/PublicInbox/DS.pm | 14 ++++-------- lib/PublicInbox/Git.pm | 4 +++- lib/PublicInbox/GitHTTPBackend.pm | 4 +++- lib/PublicInbox/HTTP.pm | 10 ++++---- lib/PublicInbox/SolverGit.pm | 3 ++- lib/PublicInbox/Tmpfile.pm | 38 +++++++++++++++++++++++++++++++ lib/PublicInbox/ViewVCS.pm | 3 ++- 8 files changed, 59 insertions(+), 18 deletions(-) create mode 100644 lib/PublicInbox/Tmpfile.pm