mirror of
https://github.com/denoland/deno.git
synced 2024-12-25 08:39:09 -05:00
fix(runtime): add missing SIGIOT alias to SIGABRT (#19333)
This commit is contained in:
parent
f3193e0e1c
commit
926d493f19
2 changed files with 22 additions and 0 deletions
|
@ -599,3 +599,22 @@ Deno.test(
|
||||||
assertStringIncludes(output, "close");
|
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");
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
|
@ -113,6 +113,7 @@ pub fn signal_str_to_int(s: &str) -> Result<libc::c_int, AnyError> {
|
||||||
"SIGQUIT" => Ok(3),
|
"SIGQUIT" => Ok(3),
|
||||||
"SIGILL" => Ok(4),
|
"SIGILL" => Ok(4),
|
||||||
"SIGTRAP" => Ok(5),
|
"SIGTRAP" => Ok(5),
|
||||||
|
"SIGIOT" => Ok(6),
|
||||||
"SIGABRT" => Ok(6),
|
"SIGABRT" => Ok(6),
|
||||||
"SIGEMT" => Ok(7),
|
"SIGEMT" => Ok(7),
|
||||||
"SIGFPE" => Ok(8),
|
"SIGFPE" => Ok(8),
|
||||||
|
@ -193,6 +194,7 @@ pub fn signal_str_to_int(s: &str) -> Result<libc::c_int, AnyError> {
|
||||||
"SIGQUIT" => Ok(3),
|
"SIGQUIT" => Ok(3),
|
||||||
"SIGILL" => Ok(4),
|
"SIGILL" => Ok(4),
|
||||||
"SIGTRAP" => Ok(5),
|
"SIGTRAP" => Ok(5),
|
||||||
|
"SIGIOT" => Ok(6),
|
||||||
"SIGABRT" => Ok(6),
|
"SIGABRT" => Ok(6),
|
||||||
"SIGBUS" => Ok(7),
|
"SIGBUS" => Ok(7),
|
||||||
"SIGFPE" => Ok(8),
|
"SIGFPE" => Ok(8),
|
||||||
|
@ -269,6 +271,7 @@ pub fn signal_str_to_int(s: &str) -> Result<libc::c_int, AnyError> {
|
||||||
"SIGQUIT" => Ok(3),
|
"SIGQUIT" => Ok(3),
|
||||||
"SIGILL" => Ok(4),
|
"SIGILL" => Ok(4),
|
||||||
"SIGTRAP" => Ok(5),
|
"SIGTRAP" => Ok(5),
|
||||||
|
"SIGIOT" => Ok(6),
|
||||||
"SIGABRT" => Ok(6),
|
"SIGABRT" => Ok(6),
|
||||||
"SIGEMT" => Ok(7),
|
"SIGEMT" => Ok(7),
|
||||||
"SIGFPE" => Ok(8),
|
"SIGFPE" => Ok(8),
|
||||||
|
|
Loading…
Reference in a new issue