From: Eric Wong Date: Sun, 28 Feb 2016 04:27:11 +0000 (+0000) Subject: spawn: disable popen optimization for non-vfork X-Git-Tag: v1.0.0~694 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;ds=sidebyside;h=e5dd8584b5e798b3c391e4f3e71a8c9e97c0f9d9;p=public-inbox.git spawn: disable popen optimization for non-vfork 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. --- diff --git a/lib/PublicInbox/Spawn.pm b/lib/PublicInbox/Spawn.pm index 72cd6c3c..51ad2692 100644 --- a/lib/PublicInbox/Spawn.pm +++ b/lib/PublicInbox/Spawn.pm @@ -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};