unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
* [PATCH] spawn: disable popen optimization for non-vfork
@ 2016-02-28  4:27 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2016-02-28  4:27 UTC (permalink / raw)
  To: meta

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 | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/lib/PublicInbox/Spawn.pm b/lib/PublicInbox/Spawn.pm
index 72cd6c3..51ad269 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};
-- 
EW


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-02-28  4:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-28  4:27 [PATCH] spawn: disable popen optimization for non-vfork Eric Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).