@@ -24,7 +24,6 @@ class Process extends EventEmitter
2424 private $ cmd ;
2525 private $ cwd ;
2626 private $ env ;
27- private $ options ;
2827 private $ enhanceSigchildCompatibility ;
2928 private $ pipes ;
3029
@@ -40,13 +39,12 @@ class Process extends EventEmitter
4039 /**
4140 * Constructor.
4241 *
43- * @param string $cmd Command line to run
44- * @param string $cwd Current working directory or null to inherit
45- * @param array $env Environment variables or null to inherit
46- * @param array $options Options for proc_open()
47- * @throws LogicException On windows or when proc_open() is not installed
42+ * @param string $cmd Command line to run
43+ * @param null|string $cwd Current working directory or null to inherit
44+ * @param null|array $env Environment variables or null to inherit
45+ * @throws \LogicException On windows or when proc_open() is not installed
4846 */
49- public function __construct ($ cmd , $ cwd = null , array $ env = null , array $ options = array () )
47+ public function __construct ($ cmd , $ cwd = null , array $ env = null )
5048 {
5149 if (substr (strtolower (PHP_OS ), 0 , 3 ) === 'win ' ) {
5250 throw new \LogicException ('Windows isn \'t supported due to the blocking nature of STDIN/STDOUT/STDERR pipes. ' );
@@ -66,7 +64,6 @@ public function __construct($cmd, $cwd = null, array $env = null, array $options
6664 }
6765 }
6866
69- $ this ->options = $ options ;
7067 $ this ->enhanceSigchildCompatibility = $ this ->isSigchildEnabled ();
7168 }
7269
@@ -99,7 +96,7 @@ public function start(LoopInterface $loop, $interval = 0.1)
9996 $ cmd = sprintf ('(%s) 3>/dev/null; code=$?; echo $code >&3; exit $code ' , $ cmd );
10097 }
10198
102- $ this ->process = proc_open ($ cmd , $ fdSpec , $ this ->pipes , $ this ->cwd , $ this ->env , $ this -> options );
99+ $ this ->process = proc_open ($ cmd , $ fdSpec , $ this ->pipes , $ this ->cwd , $ this ->env );
103100
104101 if (!is_resource ($ this ->process )) {
105102 throw new \RuntimeException ('Unable to launch a new process. ' );
0 commit comments