os.process 包主要提供 Process 进程操作接口,主要包括进程创建,标准流获取,进程等待,进程信息查询等。
本包提供多平台统一操控能力,目前支持 Linux 平台,macOS 平台,Windows 平台与 OHOS 平台。
成员 | 支持平台 |
current | Linux Windows macOS OHOS |
pid | Linux Windows macOS OHOS |
name | Linux Windows macOS OHOS |
command | Linux Windows macOS OHOS |
arguments | Linux macOS OHOS |
commandLine | Linux macOS OHOS |
workingDirectory | Linux macOS OHOS |
environment | Linux OHOS |
of(Int64) | Linux Windows macOS OHOS |
start(String, Array, Path, Map<String, String>, ProcessRedirect, ProcessRedirect, ProcessRedirect) | Linux Windows macOS OHOS |
run(String, Array, Path, Map<String, String>, ProcessRedirect, ProcessRedirect, ProcessRedirect, Duration) | Linux Windows macOS OHOS |
runOutput(String, Array, Path, Map<String, String>, ProcessRedirect, ProcessRedirect, ProcessRedirect) | Linux Windows macOS OHOS |
terminate(Bool) | Linux Windows macOS OHOS |