From: Dmitry Stogov Date: Tue, 24 Jun 2008 06:05:29 +0000 (+0000) Subject: Reverted part of Steph's patch (stdin stream must be closed to make script finish) X-Git-Tag: php-5.3.0alpha1~622 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e13bb4c5f6f594c5ab032d3ccb187f1dfc36e43d;p=php Reverted part of Steph's patch (stdin stream must be closed to make script finish) --- diff --git a/run-tests.php b/run-tests.php index 0ef03f7e97..f5cbfb05c0 100755 --- a/run-tests.php +++ b/run-tests.php @@ -929,6 +929,7 @@ function system_with_timeout($commandline, $env = null, $stdin = null) if (is_string($stdin)) { fwrite($pipes[0], $stdin); } + fclose($pipes[0]); $timeout = $leak_check ? 300 : (isset($env['TEST_TIMEOUT']) ? $env['TEST_TIMEOUT'] : 60); @@ -942,7 +943,6 @@ function system_with_timeout($commandline, $env = null, $stdin = null) if ($n === 0) { /* timed out */ $data .= "\n ** ERROR: process timed out **\n"; - fclose($pipes[0]); proc_terminate($proc); return $data; } else if ($n > 0) { @@ -958,7 +958,6 @@ function system_with_timeout($commandline, $env = null, $stdin = null) if ($stat['signaled']) { $data .= "\nTermsig=".$stat['stopsig']; } - fclose($pipes[0]); $code = proc_close($proc); return $data; }