| egid | number | Yes| No| Effective group identifier (EGID) of the process.<br>**System API**: This is a system API.<br>It is used only to test applications.|
| euid | number | Yes| No| Effective user identifier (EUID) of the process.<br>**System API**: This is a system API.<br>It is used only to test applications.|
| gid | number | Yes| No| Group identifier (GID) of the process.<br>**System API**: This is a system API.<br>It is used only to test applications.|
| uid | number | Yes| No| User identifier (UID) of the process.|
| groups | number[] | Yes| No| Array with supplementary group IDs.<br>**System API**: This is a system API.<br>It is used only to test applications.|
| pid | number | Yes| No| Process ID (PID) of the process.|
| ppid | number | Yes| No| Parent process ID (PPID) of the process.<br>**System API**: This is a system API.<br>It is used only to test applications.|
| tid<sup>8+</sup> | number | Yes| No| Thread ID (TID) of the thread.|
...
...
@@ -120,50 +115,6 @@ let result = process.getPastCpuTime() ;
```
## process.runCmd
runCmd(command: string, options?: { timeout?: number, killSignal?: number | string, maxBuffer?: number }): ChildProcess
Forks a new process to run a shell command and returns the **ChildProcess** object.
| timeout | number | No| Maximum running time (in milliseconds) of the child process. When the running time of the child process exceeds the value of this parameter, the parent process sends a **killSignal** to the child process to terminate it. The default value is **0**.|
| killSignal | number \| string | No| Signal sent to the child process when the running time of a child process exceeds the timeout period. The default value is **SIGTERM**.|
| maxBuffer | number | No| Maximum buffer size for the standard input and output of the child process. When the size is exceeded, the child process will be terminated. The default value is **1024 \* 1024**.|
@@ -729,156 +568,3 @@ let pro = new process.ProcessManager();
letpres=process.pid;
letresult=pro.kill(28,pres);
```
## ChildProcess
The **ChildProcess** object is a new child process and can be obtained by calling [process.runCmd](#processruncmd). The main process can obtain the standard input and output of the child process, send signals to the child process, and close the child process.
| pid | number | Yes| No| PID of the child process.<br>**System API**: This is a system API.<br>It is used only to test applications.|
| ppid | number | Yes| No| PPID of the child process.<br>**System API**: This is a system API.<br>It is used only to test applications.|
| exitCode | number | Yes| No| Exit code of the child process.<br>**System API**: This is a system API.<br>It is used only to test applications.|
| killed | boolean | Yes| No| Whether the parent process successfully sends a signal to the child process to terminate it.<br>**System API**: This is a system API.<br>It is used only to test applications.|
### wait
wait(): Promise<number>
Waits until the child process ends. This method uses a promise to return the exit code of the child process.