diff --git a/cli/tsc/dts/lib.deno.ns.d.ts b/cli/tsc/dts/lib.deno.ns.d.ts index e89f01cdb8..4e9765cef5 100644 --- a/cli/tsc/dts/lib.deno.ns.d.ts +++ b/cli/tsc/dts/lib.deno.ns.d.ts @@ -4416,6 +4416,8 @@ declare namespace Deno { | "SIGINFO" | "SIGINT" | "SIGIO" + | "SIGPOLL" + | "SIGUNUSED" | "SIGKILL" | "SIGPIPE" | "SIGPROF" diff --git a/runtime/ops/signal.rs b/runtime/ops/signal.rs index 5aaf1ddb26..ebc6db6d1b 100644 --- a/runtime/ops/signal.rs +++ b/runtime/ops/signal.rs @@ -339,9 +339,9 @@ pub fn signal_str_to_int(s: &str) -> Result { "SIGVTALRM" => Ok(26), "SIGPROF" => Ok(27), "SIGWINCH" => Ok(28), - "SIGIO" => Ok(29), + "SIGIO" | "SIGPOLL" => Ok(29), "SIGPWR" => Ok(30), - "SIGSYS" => Ok(31), + "SIGSYS" | "SIGUNUSED" => Ok(31), _ => Err(type_error(format!("Invalid signal : {s}"))), } } diff --git a/tests/unit/signal_test.ts b/tests/unit/signal_test.ts index 1d9b10ae7d..0c0676428a 100644 --- a/tests/unit/signal_test.ts +++ b/tests/unit/signal_test.ts @@ -304,3 +304,15 @@ Deno.test( ); }, ); + +Deno.test( + { ignore: Deno.build.os !== "linux" }, + function signalAliasLinux() { + const i = () => {}; + Deno.addSignalListener("SIGUNUSED", i); + Deno.addSignalListener("SIGPOLL", i); + + Deno.removeSignalListener("SIGUNUSED", i); + Deno.removeSignalListener("SIGPOLL", i); + }, +);