deno / 1.23.2 / ~ / deno.kill.html /

Deno.kill

Send a signal to process under given pid.

If pid is negative, the signal will be sent to the process group identified by pid. An error will be thrown if a negative pid is used on Windows.

const p = Deno.run({
  cmd: ["sleep", "10000"]
});

Deno.kill(p.pid, "SIGINT");

Requires allow-run permission.

function kill( pid: number , signo: Signal) : void;
kill( pid: number , signo: Signal) : void

Parameters

pid: number
signo: Signal

Return Type

void

© 2018–2022 the Deno authors
https://doc.deno.land/deno/stable/~/Deno.kill