I read in PHP manual about proc_get_status command but I can not use it. Could you give me any example about it. Thanks very much.
Also, do you know how to know what processes are running on Window platform?
Thanks again.
Carol
proc_get_status command
Moderator: General Moderators
hm, may be something like:
Basically, tlist is the console tool intended to show the list of tasks currently beeing executed. Backtick operator are used here to catch the output of this program.
Code: Select all
$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", "/tmp/error-output.txt", "a") // stderr is a file to write to
);
$process = proc_open("some_program.exe", $descriptorspec, $pipes);
if (is_resource($process)) {
var_dump(proc_get_status($process));
proc_close($process);
}if you have Resource Kit installed on your win box, then something like this is possible:Also, do you know how to know what processes are running on Window platform?
Code: Select all
echo `tlist`;