diff options
-rw-r--r-- | cli/tests/unit/process_test.ts | 8 | ||||
-rw-r--r-- | runtime/ops/process.rs | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/cli/tests/unit/process_test.ts b/cli/tests/unit/process_test.ts index 12946656d..8ac843973 100644 --- a/cli/tests/unit/process_test.ts +++ b/cli/tests/unit/process_test.ts @@ -476,7 +476,7 @@ unitTest( { ignore: Deno.build.os !== "windows", permissions: { run: true } }, function negativePidInvalidWindows() { assertThrows(() => { - Deno.kill(-1, "SIGINT"); + Deno.kill(-1, "SIGTERM"); }, TypeError); }, ); @@ -498,7 +498,7 @@ unitTest( }); try { - Deno.kill(p.pid, "SIGINT"); + Deno.kill(p.pid, "SIGKILL"); const status = await p.status(); assertEquals(status.success, false); @@ -506,8 +506,8 @@ unitTest( assertEquals(status.code, 1); assertEquals(status.signal, undefined); } else { - assertEquals(status.code, 130); - assertEquals(status.signal, 2); + assertEquals(status.code, 137); + assertEquals(status.signal, 9); } } finally { p.close(); diff --git a/runtime/ops/process.rs b/runtime/ops/process.rs index 7b01916b4..f6a472590 100644 --- a/runtime/ops/process.rs +++ b/runtime/ops/process.rs @@ -280,7 +280,7 @@ pub fn kill(pid: i32, signal: &str) -> Result<(), AnyError> { use winapi::um::processthreadsapi::TerminateProcess; use winapi::um::winnt::PROCESS_TERMINATE; - if !matches!(signal, "SIGINT" | "SIGKILL" | "SIGTERM") { + if !matches!(signal, "SIGKILL" | "SIGTERM") { Err(type_error(format!("Invalid signal: {}", signal))) } else if pid <= 0 { Err(type_error("Invalid pid")) |