fix(runtime): add missing SIGIOT alias to SIGABRT (#19333)

This commit is contained in:
Marvin Hagemeister 2023-06-01 00:39:01 +02:00 committed by GitHub
parent f3193e0e1c
commit 926d493f19
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 0 deletions

View file

@ -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");
},
});