diff options
author | Dmitry Stogov <dmitry@php.net> | 2008-06-24 06:05:29 +0000 |
---|---|---|
committer | Dmitry Stogov <dmitry@php.net> | 2008-06-24 06:05:29 +0000 |
commit | e13bb4c5f6f594c5ab032d3ccb187f1dfc36e43d (patch) | |
tree | dae88691d9aff67a4948ca44db166633b6920b32 /run-tests.php | |
parent | 99a430074f93decb596e4e34a7e132ad57cd1d1d (diff) | |
download | php-git-e13bb4c5f6f594c5ab032d3ccb187f1dfc36e43d.tar.gz |
Reverted part of Steph's patch (stdin stream must be closed to make script finish)
Diffstat (limited to 'run-tests.php')
-rwxr-xr-x | run-tests.php | 3 |
1 files changed, 1 insertions, 2 deletions
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; } |