function run($id)
{
$descriptorspec = array(
- 0 => array("file", "/dev/null", 'r'), // stdin is a pipe that the child will read from
- 1 => array("file", "/dev/null", 'a'), // stdout is a pipe that the child will write to
- 2 => array("file", "/dev/null", "a") // stderr is a file to write to
+ 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("pipe", "w") // stderr is a file to write to
);
$php = $_SERVER["_"];
$cwd = getcwd(); // same as run on.. (so script should end up being same relatively..)