User Tools

Site Tools


uphp:functions:process_list

process_list

WMPRO, WMMINI FW >= 1.0 WMMEGA FW >= 2.0

Return an array of the currently running scripts

Description

array process_list ( )

Parameters

None

Return Values

An array of arrays containing key/value pairs with information about each running process:

KeyTypeValue Description
pidintProcess ID, can be used with process_kill() to request termination
startintRun time of the script
scriptstringName of the running script
lineintLine number of the script if applicable
flagsintInternal process flags, see below

The internal process flags can be any of the following (OR) as a bit mask:

ValueDescription
1END - script has been signaled to end
16LOCKED - internal locks prevent the script from terminating
64SENT_OUTPUT - output has already been started to standard output

Example

<pre><?
  $process_list=process_list();
  print_r($process_list);
?></pre>

Typical output for the above example:

[$process_list] = Array (
[1] = Array (
    (int) [pid] => 1
    (int) [start] => 245285
    (string) [script] => process_list__x.cgi
    (int) [flags] => 0
)
) 

See Also

process_kill() - Send a kill request to a process

uphp/functions/process_list.txt · Last modified: 2021/09/13 05:57 (external edit)