TLSProxy::Proxy: don't waste time redirecting STDOUT and STDERR
[openssl.git] / util / perl / TLSProxy / Proxy.pm
index a87675c5ca5464b15fe819174afd631b3c181679..c29f44056f3262efd910f7141962d07d4bdf7fe4 100644 (file)
@@ -157,11 +157,6 @@ sub start
 
     $pid = fork();
     if ($pid == 0) {
 
     $pid = fork();
     if ($pid == 0) {
-        if (!$self->debug) {
-            open(STDOUT, ">", File::Spec->devnull())
-                or die "Failed to redirect stdout: $!";
-            open(STDERR, ">&STDOUT");
-        }
         my $execcmd = $self->execute
             ." s_server -no_comp -rev -engine ossltest -accept "
             .($self->server_port)
         my $execcmd = $self->execute
             ." s_server -no_comp -rev -engine ossltest -accept "
             .($self->server_port)
@@ -191,11 +186,6 @@ sub clientstart
     my ($self) = shift;
     my $oldstdout;
 
     my ($self) = shift;
     my $oldstdout;
 
-    if(!$self->debug) {
-        open DEVNULL, ">", File::Spec->devnull();
-        $oldstdout = select(DEVNULL);
-    }
-
     # Create the Proxy socket
     my $proxaddr = $self->proxy_addr;
     $proxaddr =~ s/[\[\]]//g; # Remove [ and ]
     # Create the Proxy socket
     my $proxaddr = $self->proxy_addr;
     $proxaddr =~ s/[\[\]]//g; # Remove [ and ]
@@ -217,11 +207,6 @@ sub clientstart
     if ($self->execute) {
         my $pid = fork();
         if ($pid == 0) {
     if ($self->execute) {
         my $pid = fork();
         if ($pid == 0) {
-            if (!$self->debug) {
-                open(STDOUT, ">", File::Spec->devnull())
-                    or die "Failed to redirect stdout: $!";
-                open(STDERR, ">&STDOUT");
-            }
             my $echostr;
             if ($self->reneg()) {
                 $echostr = "R";
             my $echostr;
             if ($self->reneg()) {
                 $echostr = "R";