请教proc_open的用法

请教proc_open的用法

我察看了下php的官方文档。参照了其中的例子,在windows下作了些关于路径的修改:
#!/usr/bin/php
<?php
$descriptorspec = array(
   0 => array("pipe", "r"),  // stdin is a pipe that the child will read from
   1 => array("pipe", "w"),  // stdout is a pipe that the child will write to
   2 => array("file", "c:\\temp\error-output.txt", "a") // stderr is a file to write to
);

$cwd = 'c:\\temp';
$env = array('some_option' => 'aeiou');

$process = proc_open('php', $descriptorspec, $pipes, $cwd, $env);

if (is_resource($process)) {
    // $pipes now looks like this:
    // 0 => writeable handle connected to child stdin
    // 1 => readable handle connected to child stdout
    // Any error output will be appended to /tmp/error-output.txt

    fwrite($pipes[0], '<?php print_r($_ENV); ?>');
    fclose($pipes[0]);

    echo stream_get_contents($pipes[1]);
    fclose($pipes[1]);

    // It is important that you close any pipes before calling
    // proc_close in order to avoid a deadlock
    $return_value = proc_close($process);

    echo "command returned $return_value\n";
}
?>
运行结果为:

D:\php_test>php test2.php
command returned 1
可是我并没有看到有什么子进程在运行,也没什么效果。
不过虽然看了文档,但还是不清楚具体这是个什么样的函数,各参数有什么意思。他怎么调用其他进程的,请高手指点!!

这个确实复杂,我也没搞懂