feat: add GetProcessInfo for system package

This commit is contained in:
dudaodong committed 2024-09-13 16:10:09 +08:00
1 parent e58c9b797b
commit 2bbcb85286
5 files changed
+261 -1

No files matched your search

+14
View File
@@ -117,3 +117,17 @@ func ExampleKillProcess() {
// Output:
// <nil>
}
func ExampleGetProcessInfo() {
pid, err := StartProcess("ls", "-a")
if err != nil {
return
}
processInfo, err := GetProcessInfo(pid)
if err != nil {
return
}
fmt.Println(processInfo)
}