Skip to contents

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=1109803, NAME=R, AT=2026-05-11 16:41:25.223517
ps_pid(p)
#> [1] 1109803
ps_pid(p) == Sys.getpid()
#> [1] TRUE