未验证 提交 43648476 编写于 作者: O openharmony_ci 提交者: Gitee

!3994 翻译完成:3903 修改 docs 中process 接口说明

Merge pull request !3994 from wusongqing/TR3903
...@@ -17,13 +17,13 @@ import process from '@ohos.process'; ...@@ -17,13 +17,13 @@ import process from '@ohos.process';
| Name| Type| Readable| Writable| Description| | Name| Type| Readable| Writable| Description|
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| egid | number | Yes| No| Effective group identifier (EGID) of a process.| | egid | number | Yes| No| Effective group identifier (EGID) of a process. This is a system API and cannot be called by third-party applications.|
| euid | number | Yes| No| Effective user identifier (EUID) of a process.| | euid | number | Yes| No| Effective user identifier (EUID) of a process. This is a system API and cannot be called by third-party applications.|
| gid | number | Yes| No| Group identifier (GID) of a process.| | gid | number | Yes| No| Group identifier (GID) of a process. This is a system API and cannot be called by third-party applications.|
| uid | number | Yes| No| User identifier (UID) of a process.| | uid | number | Yes| No| User identifier (UID) of a process.|
| groups | number[] | Yes| No| Array with supplementary group IDs.| | groups | number[] | Yes| No| Array with supplementary group IDs. This is a system API and cannot be called by third-party applications.|
| pid | number | Yes| No| Process ID (PID) of a process.| | pid | number | Yes| No| Process ID (PID) of a process.|
| ppid | number | Yes| No| Parent process ID (PPID) of a process.| | ppid | number | Yes| No| Parent process ID (PPID) of a process. This is a system API and cannot be called by third-party applications.|
| tid<sup>8+</sup> | number | Yes| No| Thread ID (TID) of a process.| | tid<sup>8+</sup> | number | Yes| No| Thread ID (TID) of a process.|
...@@ -38,10 +38,10 @@ Allows a process to obtain the standard input and output of its child processes, ...@@ -38,10 +38,10 @@ Allows a process to obtain the standard input and output of its child processes,
| Name| Type| Readable| Writable| Description| | Name| Type| Readable| Writable| Description|
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| pid | number | Yes| No| PID of the child process.| | pid | number | Yes| No| PID of the child process. This is a system API and cannot be called by third-party applications.|
| ppid | number | Yes| No| PPID of the child process.| | ppid | number | Yes| No| PPID of the child process. This is a system API and cannot be called by third-party applications.|
| exitCode | number | Yes| No| Exit code of the child process.| | exitCode | number | Yes| No| Exit code of the child process. This is a system API and cannot be called by third-party applications.|
| killed | boolean | Yes| No| Whether the parent process successfully sends a signal to the child process to terminate it.| | killed | boolean | Yes| No| Whether the parent process successfully sends a signal to the child process to terminate it. This is a system API and cannot be called by third-party applications.|
### wait ### wait
...@@ -50,6 +50,8 @@ wait(): Promise&lt;number&gt; ...@@ -50,6 +50,8 @@ wait(): Promise&lt;number&gt;
Waits until the child process ends. This method uses a promise to return the exit code of the child process. Waits until the child process ends. This method uses a promise to return the exit code of the child process.
This is a system API and cannot be called by third-party applications.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Return value** **Return value**
...@@ -75,6 +77,8 @@ getOutput(): Promise&lt;Uint8Array&gt; ...@@ -75,6 +77,8 @@ getOutput(): Promise&lt;Uint8Array&gt;
Obtains the standard output of the child process. Obtains the standard output of the child process.
This is a system API and cannot be called by third-party applications.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Return value** **Return value**
...@@ -100,6 +104,8 @@ getErrorOutput(): Promise&lt;Uint8Array&gt; ...@@ -100,6 +104,8 @@ getErrorOutput(): Promise&lt;Uint8Array&gt;
Obtains the standard error output of the child process. Obtains the standard error output of the child process.
This is a system API and cannot be called by third-party applications.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Return value** **Return value**
...@@ -125,6 +131,8 @@ close(): void ...@@ -125,6 +131,8 @@ close(): void
Closes the child process in running. Closes the child process in running.
This is a system API and cannot be called by third-party applications.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Example** **Example**
...@@ -141,6 +149,8 @@ kill(signal: number | string): void ...@@ -141,6 +149,8 @@ kill(signal: number | string): void
Sends a signal to the specified child process to terminate it. Sends a signal to the specified child process to terminate it.
This is a system API and cannot be called by third-party applications.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
...@@ -383,6 +393,8 @@ runCmd(command: string, options?: { timeout : number, killSignal : number | stri ...@@ -383,6 +393,8 @@ runCmd(command: string, options?: { timeout : number, killSignal : number | stri
Forks a new process to run a shell command and returns the **ChildProcess** object. Forks a new process to run a shell command and returns the **ChildProcess** object.
This is a system API and cannot be called by third-party applications.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
...@@ -438,6 +450,8 @@ on(type: string, listener: EventListener): void ...@@ -438,6 +450,8 @@ on(type: string, listener: EventListener): void
Stores the events triggered by the user. Stores the events triggered by the user.
This is a system API and cannot be called by third-party applications.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
...@@ -468,6 +482,8 @@ off(type: string): boolean ...@@ -468,6 +482,8 @@ off(type: string): boolean
Deletes the event stored by the user. Deletes the event stored by the user.
This is a system API and cannot be called by third-party applications.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
...@@ -521,6 +537,8 @@ cwd(): string ...@@ -521,6 +537,8 @@ cwd(): string
Obtains the working directory of this process. Obtains the working directory of this process.
This is a system API and cannot be called by third-party applications.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Example** **Example**
...@@ -536,6 +554,8 @@ chdir(dir: string): void ...@@ -536,6 +554,8 @@ chdir(dir: string): void
Changes the working directory of this process. Changes the working directory of this process.
This is a system API and cannot be called by third-party applications.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
**Parameters** **Parameters**
...@@ -594,6 +614,7 @@ Sends a signal to the specified process to terminate it. ...@@ -594,6 +614,7 @@ Sends a signal to the specified process to terminate it.
| boolean | Returns **true** if the signal is sent successfully; returns **false** otherwise.| | boolean | Returns **true** if the signal is sent successfully; returns **false** otherwise.|
**Example** **Example**
```js ```js
var pres = process.pid var pres = process.pid
var result = that.kill(28, pres) var result = that.kill(28, pres)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册