From 4ac01d86b1946c718787bf6a057a5d0a7e646adf Mon Sep 17 00:00:00 2001 From: Wei Mingzhi Date: Tue, 13 Jan 2026 19:10:05 +0800 Subject: [PATCH] fix: explicitly specify signal numbers for process group compatibility Always include -15 (SIGTERM) or -9 (SIGKILL) to ensure negative PIDs are correctly handled as process group IDs --- index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.js b/index.js index 8c85c74..425ddab 100644 --- a/index.js +++ b/index.js @@ -151,6 +151,8 @@ const defaultKill = (input, options) => { if (options.force) { arguments_.unshift('-9'); + } else { + arguments_.unshift('-15'); } if (killByName && options.ignoreCase) {