From 267371b1273b518215939e817e53733584b68af7 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 29 Dec 2019 12:51:18 +0000 Subject: spawn: allow passing GLOB handles for redirects We can save callers the trouble of {-hold} and {-dev_null} refs as well as the trouble of calling fileno(). --- lib/PublicInbox/Admin.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/PublicInbox/Admin.pm') diff --git a/lib/PublicInbox/Admin.pm b/lib/PublicInbox/Admin.pm index 32a9f65e..5a3554cf 100644 --- a/lib/PublicInbox/Admin.pm +++ b/lib/PublicInbox/Admin.pm @@ -241,8 +241,7 @@ sub progress_prepare ($) { if ($opt->{quiet}) { open my $null, '>', '/dev/null' or die "failed to open /dev/null: $!\n"; - $opt->{1} = fileno($null); # suitable for spawn() redirect - $opt->{-dev_null} = $null; + $opt->{1} = $null; # suitable for spawn() redirect } else { $opt->{verbose} ||= 1; $opt->{-progress} = sub { print STDERR @_ }; -- cgit v1.2.3-24-ge0c7