Functions

f
isTargetablePid(pid: number): boolean

Whether pid is safe to hand to a negated process.kill.

f
killProcessGroup(pid: number): void

Sends SIGKILL to a process and its entire process group. Requires the target to have been spawned with detached: true so that PGID === pid.

Usage

import * as mod from "lib/utils/kill-process-group.ts";