2022-07-16 18:49:58 +03:00
|
|
|
# `wezterm.procinfo.get_info_for_pid(pid)`
|
|
|
|
|
2023-03-21 08:01:24 +03:00
|
|
|
{{since('20220807-113146-c2fee766')}}
|
2022-07-16 18:49:58 +03:00
|
|
|
|
|
|
|
Returns a [LocalProcessInfo](../LocalProcessInfo.md) object for the specified
|
|
|
|
process id.
|
|
|
|
|
|
|
|
This function may return `nil` if it was unable to return the info.
|
|
|
|
|
2022-07-19 16:58:38 +03:00
|
|
|
```
|
2022-07-16 18:49:58 +03:00
|
|
|
> wezterm.procinfo.get_info_for_pid(wezterm.procinfo.pid())
|
|
|
|
{
|
|
|
|
"argv": [
|
|
|
|
"/home/wez/wez-personal/wezterm/target/debug/wezterm-gui",
|
|
|
|
],
|
|
|
|
"children": {
|
|
|
|
540513: {
|
|
|
|
"argv": [
|
|
|
|
"-zsh",
|
|
|
|
],
|
|
|
|
"children": {},
|
|
|
|
"cwd": "/home/wez",
|
|
|
|
"executable": "/usr/bin/zsh",
|
|
|
|
"name": "zsh",
|
|
|
|
"pid": 540513,
|
|
|
|
"ppid": 540450,
|
|
|
|
"start_time": 232656896,
|
|
|
|
"status": "Sleep",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"cwd": "/home/wez/wez-personal/wezterm",
|
|
|
|
"executable": "/home/wez/wez-personal/wezterm/target/debug/wezterm-gui",
|
|
|
|
"name": "wezterm-gui",
|
|
|
|
"pid": 540450,
|
|
|
|
"ppid": 425276,
|
|
|
|
"start_time": 8671498240,
|
|
|
|
"status": "Run",
|
|
|
|
}
|
|
|
|
```
|