]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/TestCommon.pm
treewide: fix %SIG localization, harder
[public-inbox.git] / lib / PublicInbox / TestCommon.pm
index 9e15239465aabe05728603b3db8869f48f128b7c..92a7db36969559f28e358d616c032e84daa24faa 100644 (file)
@@ -317,7 +317,8 @@ sub run_script ($;$$) {
                # note: "local *STDIN = *STDIN;" and so forth did not work in
                # old versions of perl
                local %ENV = $env ? (%ENV, %$env) : %ENV;
-               local %SIG = %SIG;
+               local @SIG{keys %SIG} = map { undef } values %SIG;
+               local $SIG{FPE} = 'IGNORE'; # Perl default
                local $0 = join(' ', @$cmd);
                my $orig_io = _prepare_redirects($fhref);
                my $cwdfh = $lei_cwdfh;