Browse Source

Optimized for windows

walkor 4 years ago
parent
commit
da3610a934
1 changed files with 2 additions and 3 deletions
  1. 2 3
      Worker.php

+ 2 - 3
Worker.php

@@ -1384,7 +1384,7 @@ class Worker
     {
         $files = static::getStartFilesForWindows();
         global $argv;
-        if(\in_array('-q', $argv) || \count($files) === 1)
+        if(\in_array('-q', $argv))
         {
             if(\count(static::$_workers) > 1)
             {
@@ -1451,9 +1451,8 @@ class Worker
             2 => array('file', $std_file, 'w') // stderr
         );
 
-
         $pipes       = array();
-        $process     = \proc_open("php \"$start_file\" -q", $descriptorspec, $pipes);
+        $process     = \proc_open(PHP_BINARY . " \"$start_file\" -q", $descriptorspec, $pipes);
         $std_handler = \fopen($std_file, 'a+');
         \stream_set_blocking($std_handler, false);