Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ps_send_signal

Send signal to a process


Description

Send a signal to the process. Not implemented on Windows. See signals() for the list of signals on the current platform.

Usage

ps_send_signal(p = ps_handle(), sig)

Arguments

p

Process handle.

sig

Signal number, see signals().

Details

It checks if the process is still running, before sending the signal, to avoid signalling the wrong process, because of pid reuse.

See Also

Examples

px <- processx::process$new("sleep", "10")
p <- ps_handle(px$get_pid())
p
ps_send_signal(p, signals()$SIGINT)
p
ps_is_running(p)
px$get_exit_status()

ps

List, Query, Manipulate System Processes

v1.6.0
MIT + file LICENSE
Authors
Jay Loden [aut], Dave Daeschler [aut], Giampaolo Rodola' [aut], Gábor Csárdi [aut, cre], RStudio [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.