From e13bb4c5f6f594c5ab032d3ccb187f1dfc36e43d Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 24 Jun 2008 06:05:29 +0000 Subject: [PATCH] Reverted part of Steph's patch (stdin stream must be closed to make script finish) --- run-tests.php | 3 +-- 1 file changed, 1 insertion(+), 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; } -- 2.50.1