From 926d493f1967faa143205ad02a9c35f757829603 Mon Sep 17 00:00:00 2001 From: Marvin Hagemeister Date: Thu, 1 Jun 2023 00:39:01 +0200 Subject: fix(runtime): add missing SIGIOT alias to SIGABRT (#19333) --- cli/tests/unit_node/child_process_test.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'cli/tests') diff --git a/cli/tests/unit_node/child_process_test.ts b/cli/tests/unit_node/child_process_test.ts index e89fd7d79..d4a2a4cc6 100644 --- a/cli/tests/unit_node/child_process_test.ts +++ b/cli/tests/unit_node/child_process_test.ts @@ -599,3 +599,22 @@ Deno.test( assertStringIncludes(output, "close"); }, ); + +Deno.test({ + name: "[node/child_process spawn] supports SIGIOT signal", + ignore: Deno.build.os === "windows", + async fn() { + const script = path.join( + path.dirname(path.fromFileUrl(import.meta.url)), + "testdata", + "child_process_stdin.js", + ); + const cp = spawn(Deno.execPath(), ["run", "-A", script]); + const p = withTimeout(); + cp.on("exit", () => p.resolve()); + cp.kill("SIGIOT"); + await p; + assert(cp.killed); + assertEquals(cp.signalCode, "SIGIOT"); + }, +}); -- cgit v1.2.3