Skip to main content

removeSignalListener

function Deno.removeSignalListener
Jump to headingremoveSignalListener(
signal: Signal,
handler: () => void,
): void

Removes the given signal listener that has been registered with Deno.addSignalListener.

const listener = () => {
  console.log("SIGTERM!")
};
Deno.addSignalListener("SIGTERM", listener);
Deno.removeSignalListener("SIGTERM", listener);

Note: On Windows only "SIGINT" (CTRL+C) and "SIGBREAK" (CTRL+Break) are supported.

Parameters Jump to heading

Jump to headinghandler: () => void

Return Type Jump to heading

void
Back to top