]> Sergey Matveev's repositories - public-inbox.git/commitdiff
spawn: disable popen optimization for non-vfork
authorEric Wong <e@80x24.org>
Sun, 28 Feb 2016 04:27:11 +0000 (04:27 +0000)
committerEric Wong <e@80x24.org>
Sun, 28 Feb 2016 04:27:39 +0000 (04:27 +0000)
This is necessary since we want to be able to do arbitrary redirects
via the popen interface.  Oh well, we'll be a little slower for now
for users without vfork.  vfork users will get all the performance
benefits.

lib/PublicInbox/Spawn.pm

index 72cd6c3cc4fce032bb8ce36b025854dbeb5b67b4..51ad2692b82e6ff3d6ec49abfda6f02d4d801ea3 100644 (file)
@@ -165,11 +165,6 @@ sub spawn ($;$$) {
 
 sub popen_rd {
        my ($cmd, $env, $opts) = @_;
-       unless (wantarray || defined $vfork_spawn || defined $env) {
-               open my $fh, '-|', @$cmd or
-                       die('open `'.join(' ', @$cmd) . " pipe failed: $!\n");
-               return $fh
-       }
        pipe(my ($r, $w)) or die "pipe: $!\n";
        $opts ||= {};
        my $blocking = $opts->{Blocking};