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 11DDE2143D for ; Mon, 21 Jan 2019 20:53:02 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 37/37] t/check-www-inbox: trap SIGINT for File::Temp destruction Date: Mon, 21 Jan 2019 20:52:53 +0000 Message-Id: <20190121205253.10455-38-e@80x24.org> In-Reply-To: <20190121205253.10455-1-e@80x24.org> References: <20190121205253.10455-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Otherwise, temporary GDBM files don't get unlinked when I SIGINT the process. --- t/check-www-inbox.perl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/t/check-www-inbox.perl b/t/check-www-inbox.perl index 6232f16..1e88e95 100644 --- a/t/check-www-inbox.perl +++ b/t/check-www-inbox.perl @@ -14,6 +14,7 @@ use POSIX qw(:sys_wait_h); use Time::HiRes qw(gettimeofday tv_interval); use WWW::Mechanize; use Data::Dumper; +our $tmp_owner = $$; my $nproc = 4; my $slow = 0.5; my %opts = ( @@ -34,6 +35,7 @@ my $atom_check = eval { } if $xmlstarlet; my %workers; +$SIG{INT} = sub { exit 130 }; $SIG{TERM} = sub { exit 0 }; $SIG{CHLD} = sub { while (1) { -- EW