diff options
author | Anatol Belski <ab@php.net> | 2018-05-18 18:37:53 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2018-05-18 18:37:53 +0200 |
commit | f7b431fb303f9785f2e72802659998bee2380415 (patch) | |
tree | 26b5f8492bede180ce3c20f1071243066b3bc996 | |
parent | b027071688ef60e0c62cfa09d1e30c7121667632 (diff) | |
parent | 6043a2d6f74bf5125573fde198070ac9804d5e6e (diff) | |
download | php-git-f7b431fb303f9785f2e72802659998bee2380415.tar.gz |
Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
Fix Opcache test fails regarding to AppVeyor image update
-rw-r--r-- | ext/opcache/tests/php_cli_server.inc | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/ext/opcache/tests/php_cli_server.inc b/ext/opcache/tests/php_cli_server.inc index 456ed663b8..ca781b7cd7 100644 --- a/ext/opcache/tests/php_cli_server.inc +++ b/ext/opcache/tests/php_cli_server.inc @@ -7,16 +7,22 @@ function php_cli_server_start($ini = "") { $php_executable = getenv('TEST_PHP_EXECUTABLE'); $doc_root = __DIR__; - $descriptorspec = array( - 0 => STDIN, - 1 => STDOUT, - 2 => STDERR, - ); - if (substr(PHP_OS, 0, 3) == 'WIN') { + $descriptorspec = array( + 0 => STDIN, + 1 => STDOUT, + 2 => array("pipe", "w"), + ); + $cmd = "{$php_executable} -t {$doc_root} $ini -S " . PHP_CLI_SERVER_ADDRESS; $handle = proc_open(addslashes($cmd), $descriptorspec, $pipes, $doc_root, NULL, array("bypass_shell" => true, "suppress_errors" => true)); } else { + $descriptorspec = array( + 0 => STDIN, + 1 => STDOUT, + 2 => STDERR, + ); + $cmd = "exec {$php_executable} -t {$doc_root} $ini -S " . PHP_CLI_SERVER_ADDRESS . " 2>/dev/null"; $handle = proc_open($cmd, $descriptorspec, $pipes, $doc_root); } |