From aacd0f52d9f4ba6821ad34b30a123966958c7e0c Mon Sep 17 00:00:00 2001 From: "Eric Wong (Contractor, The Linux Foundation)" Date: Thu, 29 Mar 2018 20:17:17 +0000 Subject: import: run_die supports redirects as spawn does We'll be using it in more future tests and scripts. --- lib/PublicInbox/Import.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/PublicInbox/Import.pm') diff --git a/lib/PublicInbox/Import.pm b/lib/PublicInbox/Import.pm index f00c260b..463b44e2 100644 --- a/lib/PublicInbox/Import.pm +++ b/lib/PublicInbox/Import.pm @@ -387,9 +387,9 @@ sub add { $self->{tip} = ":$commit"; } -sub run_die ($;$) { - my ($cmd, $env) = @_; - my $pid = spawn($cmd, $env, undef); +sub run_die ($;$$) { + my ($cmd, $env, $rdr) = @_; + my $pid = spawn($cmd, $env, $rdr); defined $pid or die "spawning ".join(' ', @$cmd)." failed: $!"; waitpid($pid, 0) == $pid or die join(' ', @$cmd) .' did not finish'; $? == 0 or die join(' ', @$cmd) . " failed: $?\n"; -- cgit v1.2.3-24-ge0c7