This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v20 R7
Process info
|
Process info ( processNumber ) -> Function result | ||||||||
Parameter | Type | Description | ||||||
processNumber | Integer |
![]() |
Process number | |||||
Function result | Object |
![]() |
Information about the process | |||||
The Process info command returns an object providing detailed information about process whose number you pass in processNumber.
If you pass an incorrect process number, the command returns a null object.
The returned object contains the following properties:
Property | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
cpuTime | Real | Running time (seconds) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
cpuUsage | Real | Percentage of time devoted to this process (between 0 and 1) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
creationDateTime | Text (Date ISO 8601) | Date and time of process creation | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ID | Longint | Process unique ID | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name | Text | Process name | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
number | Longint | Process number | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
preemptive | Boolean | True if run preemptive, false otherwise | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
sessionID | Text | Session UUID | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
state | Longint | Current status. Possible values:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
systemID | Text | ID for the user process, 4D process or spare process | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
type | Longint | Running process type. Possible values (see also note):
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
visible | Boolean | True if visible, false otherwise |
Note: 4D’s internal processes have a negative type value and processes generated by the user have a positive value. Worker processes launched by user have type 5.
Here is an example of output object:
{
"number": 4,
"name": "Application process",
"sessionID": "3C81A8D7AFE64C2E9CCFFCDC35DC52F5",
"ID": 4,
"visible": true,
"type": -18,
"state": 0,
"creationDateTime": "2024-09-22T12:46:39.787Z",
"preemptive": false,
"systemID": "123145476132864",
"cpuUsage": 0,
"cpuTime": 0.006769
}
You want to know if the process is preemptive:
var $preemptive : Boolean
$preemptive:=Process info(Current process).preemptive
_o_PROCESS PROPERTIES
Count tasks
Process activity
Process state
Session info
Product: 4D
Theme: Processes
Number:
1843
Created: 4D v20 R7
4D Language Reference ( 4D v20 R7)