Suspend process execution with SIGSTOP preemptively checking whether PID has been reused. On Windows this has the effect of suspending all process threads.

ps_suspend(p)

Arguments

p

Process handle.

See also

Examples

px <- processx::process$new("sleep", "10") p <- ps_handle(px$get_pid()) p
#> <ps::ps_handle> PID=17456, NAME=sleep, AT=2020-02-16 11:38:37
ps_suspend(p)
#> NULL
#> [1] "stopped"
#> NULL
#> [1] "sleeping"
#> NULL