All pastes #423600 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-04-04 09:12 UTC
rendered paste body
$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("pipe", "w") // stderr is a file to write to
);

$cwd = '';
$env = array();

$process = proc_open('/path/to/php /path/to/main.php-gtk', $descriptorspec, $pipes, $cwd, $env);

if (is_resource($process)) {
die();
}