Info
Information about a process at a moment in time.
Every field other than pid and name
may be nil for reasons beyond those documented on it: the process had
already exited and the value was no longer available, it was a kernel process
and never had one, or it could not be read for want of permission.
Example
Fields
cmdline @ (Tuple[...Str] | nil)[get]The argument vector, as
Strelements.Restricted to processes owned by the same user on macOS. Windows represents arguments as a single string rather than an array, so what is reported here is split according to typical C runtime conventions;
cmdline_winis the raw original.cmdline_win @ (Str | nil)[get]The command line as a single string.
Returns
nilon non-Windows targets.cwd @ (fs.Path | nil)[get]The working directory.
Reading another user's working directory needs elevated rights. On Windows this is maintained by the C runtime rather than reported authoritatively by the kernel, so an application may set it to anything.
exe @ (fs.Path | nil)[get]The executable path.
Reading another user's executable path needs elevated rights on every platform.
name @ Str[get]The kernel's short name for the process.
On Unix this reflects whatever the process last set, and is typically truncated.
parent_pid @ (Int | nil)[get]The parent process ID.
Windows does not reparent orphaned processes, so this may be invalid or reassigned.
pid @ Int[get]The process ID.
status @ (Status | nil)[get]How the process ended, or
nilif it was still running.token_info @ (security.windows.TokenInfo | nil)[get]The process access token.
Returns
nilon non-Windows targets.unix_id @ (security.unix.Identity | nil)[get]The process credentials.
Returns
nilon non-Unix targets. On macOS,groupsis capped at 16 entries.