Skip to content

The name of the user that owns the process. On Unix it is calculated from the real user id.

Usage

ps_username(p = ps_handle())

Arguments

p

Process handle.

Value

String scalar.

Details

On Unix, a numeric uid id returned if the uid is not in the user database, thus a username cannot be determined.

Works for zombie processes.

Examples

p <- ps_handle()
p
#> <ps::ps_handle> PID=6327, NAME=R, AT=2024-01-21 20:57:52.64
ps_username(p)
#> [1] "runner"