mirror of
https://github.com/php/php-src.git
synced 2024-10-14 04:52:33 +00:00
a3a2dcd8a9
to calling proc_close(). Implement proc_get_status(resource $process) which returns an array of information about a process created with proc_open(). The information includes: array( "command" => string "name of the command", "pid" => long process identifier, "running" => bool true if the process is still running "exitcode" => long exitcode if the process exited "signaled" => bool true if the process was signaled "termsig" => long signal number if signaled "stopped" => bool true if the process is stopped "stopsig" => long signal number if stopped );
30 lines
365 B
PHP
30 lines
365 B
PHP
--TEST--
|
|
proc_open
|
|
--SKIPIF--
|
|
<?php # vim:syn=php
|
|
if (!is_executable("/bin/cat")) echo "skip";
|
|
?>
|
|
--POST--
|
|
--GET--
|
|
--FILE--
|
|
<?php
|
|
$ds = array(
|
|
0 => array("pipe", "r"),
|
|
1 => array("pipe", "w"),
|
|
2 => array("pipe", "w")
|
|
);
|
|
|
|
$cat = proc_open(
|
|
"/bin/cat",
|
|
$ds,
|
|
$pipes
|
|
);
|
|
|
|
proc_close($cat);
|
|
|
|
echo "I didn't segfault!\n";
|
|
|
|
?>
|
|
--EXPECT--
|
|
I didn't segfault!
|