]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Spawn.pm
spawn (and thus popen_rd) die on failure
[public-inbox.git] / lib / PublicInbox / Spawn.pm
index 6eea2b9c7ff0886d5e5b0756a5ceb1da04253d30..b02d536866836cec97ecbfc82002793fc59dbd9c 100644 (file)
@@ -15,7 +15,6 @@ use strict;
 use warnings;
 use base qw(Exporter);
 use Symbol qw(gensym);
-use IO::Handle;
 use PublicInbox::ProcessPipe;
 our @EXPORT_OK = qw/which spawn popen_rd/;
 sub RLIMITS () { qw(RLIMIT_CPU RLIMIT_CORE RLIMIT_DATA) }
@@ -220,7 +219,6 @@ sub popen_rd {
        $opts ||= {};
        $opts->{1} = fileno($w);
        my $pid = spawn($cmd, $env, $opts);
-       return unless defined $pid;
        return ($r, $pid) if wantarray;
        my $ret = gensym;
        tie *$ret, 'PublicInbox::ProcessPipe', $pid, $r;