summaryrefslogtreecommitdiff
path: root/tests/unit_node/process_test.ts
diff options
context:
space:
mode:
authorBedis Nbiba <bedisnbiba@gmail.com>2024-05-19 19:52:03 +0100
committerGitHub <noreply@github.com>2024-05-19 14:52:03 -0400
commit927cbb5ecde7581fd80ce4c6ed013ba4e742d5df (patch)
treeeafa5c953d633cdcdaf665b7636f987954c9614d /tests/unit_node/process_test.ts
parent9e890399fc20ebd4d87cd490d84475309f57d56c (diff)
fix: handle signal 0 in process.kill (#23473)
the last commit had a regression, where it removed this branch, I haven't tested the code but I think it should work --------- Signed-off-by: Bedis Nbiba <bedisnbiba@gmail.com>
Diffstat (limited to 'tests/unit_node/process_test.ts')
-rw-r--r--tests/unit_node/process_test.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/unit_node/process_test.ts b/tests/unit_node/process_test.ts
index 491a70bfc..0eadb0a16 100644
--- a/tests/unit_node/process_test.ts
+++ b/tests/unit_node/process_test.ts
@@ -243,6 +243,11 @@ Deno.test(
args: ["eval", "setTimeout(() => {}, 10000)"],
}).spawn();
+ // kill with signal 0 should keep the process alive in linux (true means no error happened)
+ // windows ignore signals
+ if (Deno.build.os !== "windows") {
+ assertEquals(process.kill(p.pid, 0), true);
+ }
process.kill(p.pid);
await p.status;
},