Skip to content

This function works even if the process has already finished.

Usage

ps_pid(p = ps_handle())

Arguments

p

Process handle.

Value

Process id.

Examples

p <- ps_handle()
p
#> <ps::ps_handle> PID=6961, NAME=R, AT=2026-04-20 16:44:45.56573
ps_pid(p)
#> [1] 6961
ps_pid(p) == Sys.getpid()
#> [1] TRUE