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