popen и proc_open, кажется, делают это:)
file1.php
<?php
$descs = array(
0 => array("pipe", "r"),
1 => array("pipe", "w"),
2 => array("file", "/tmp/error-output.txt", "a")
);
$process = proc_open("php -f file2.php", $descs, $pipess);
sleep(100);
file2.php
<?php
$desc = array(
0 => array("pipe", "r"),
1 => array("pipe", "w"),
2 => array("file", "/tmp/error-output.txt", "a")
);
echo "asd";
$process[] = proc_open("sleep 12", $desc, $pipes);
echo "sleep!";
$process[] = proc_open("sleep 10", $desc, $pipes);
echo "asd";