@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

main
ts 9 lines 380 Bytes
Raw
1 /** `kill(0)` signals this server's group; `kill(-1)` signals every process the user owns. */
2 export function signalProcessGroup(pid: number, signal: NodeJS.Signals | 0): void {
3 if (!Number.isSafeInteger(pid) || pid <= 1) {
4 throw Object.assign(new Error(`kill ESRCH: not a spawned process group (${pid})`), {
5 code: "ESRCH",
6 });
7 }
8 process.kill(-pid, signal);
9 }