]> granicus.if.org Git - php/commitdiff
enforce the test ini usage for the child process
authorAnatol Belski <ab@php.net>
Sun, 4 Dec 2016 13:01:40 +0000 (14:01 +0100)
committerAnatol Belski <ab@php.net>
Sun, 4 Dec 2016 13:01:40 +0000 (14:01 +0100)
ext/openssl/tests/ServerClientTestCase.inc

index 03e0c2de87c92ab3e3cf420b0389c7eb9869f332..478b337ef032b5250b70accd5ac21c2959087cba 100644 (file)
@@ -48,9 +48,13 @@ class ServerClientTestCase
 
     private function spawnWorkerProcess($code)
     {
-        $cmd = sprintf('%s "%s" %s', PHP_BINARY, __FILE__, WORKER_ARGV_VALUE);
-
-        $this->workerHandle = proc_open($cmd, [['pipe', 'r'], ['pipe', 'w'], STDERR], $pipes);
+       if (defined("PHP_WINDOWS_VERSION_MAJOR")) {
+               $ini = php_ini_loaded_file();
+               $cmd = sprintf('%s %s "%s" %s', PHP_BINARY, $ini ? "-n -c $ini" : "", __FILE__, WORKER_ARGV_VALUE);
+       } else {
+               $cmd = sprintf('%s "%s" %s', PHP_BINARY, __FILE__, WORKER_ARGV_VALUE);
+       }
+       $this->workerHandle = proc_open($cmd, [['pipe', 'r'], ['pipe', 'w'], STDERR], $pipes);
         $this->workerStdIn = $pipes[0];
         $this->workerStdOut = $pipes[1];