PHP函数库分类十七
PHP 函数库分类十七
6.Program execution 函数列表 2
? proc_get_status - Get information about a process opened by proc_open
proc_get_status
(PHP 5) proc_get_status — Get information about a process opened by proc_open()
说明
array proc_get_status ( resource $process ) proc_get_status() fetches data about a process opened using proc_open().
参数
process
The proc_open() resource that will be evaluated.
返回值
An array of collected information on success, and FALSE on failure. The returned array contains the following elements:
element comman d pid running signaled type strin g int bool bool description The command string that was passed to proc_open(). process id
TRUE if the process is still running, FALSE if it has terminated. TRUE if the child process has been terminated by an uncaught signal. Always set to FALSE on Windows.
element stopped
type bool
description
TRUE if the child process has been stopped by a signal. Always set to FALSE on Windows.
The exit code returned by the process (which is only meaningful if running is FALSE). Only first call of this function return real value, next calls return -1. The number of the signal that caused the child process to terminate its execution (only meaningful if signaled isTRUE). The number of the signal that caused the child process to stop its execution (only meaningful if stopped isTRUE).
exitcode
int
termsig
int
stopsig
int
? proc_nice - Change the priority of the current process
proc_nice
(PHP 5) proc_nice — Change the priority of the current process
说明
bool proc_nice ( int $increment ) proc_nice() changes the priority of the current process by the amount specified in increment. A positive increment will lower the priority of the current process, whereas a negative increment will raise the priority. proc_nice() is not related to proc_open() and its associated functions in any way.
参数
increment
The increment value of the priority change.
返回值
成功时返回 TRUE, 或者在失败时返回 FALSE. If an error occurs, like the user lacks permission to change the priority, an error of level E_WARNING is also generated.
注释
Note: Availability proc_nice() will only exist if your system has 'nice' capabilities. 'nice' conforms to: SVr4, SVID EXT, AT&T, X/OPEN, BSD 4.3. This means thatproc_nice() is not available on Windows.
? proc_open - Execute a command and open file pointers for input/output
proc_open
(PHP 4 >= 4.3.0, PHP 5) proc_open — Execute a command and open file pointers for input/output
说明
resource proc_open ( string $cmd , array $descriptorspec , arra y &$pipes [, string $cwd[, array $env [, array $other_options ]]] ) proc_open(
) is similar to popen() but provides a much greater degree of control over the program execution.
参数
cmd
The command to execute
descriptorspec
An indexed array where the key represents the descriptor number and the value represents how PHP will pass that descriptor to the child process.
第1页下一页