Skip to main content
Deno.addSignalListener - Deno documentation
function Deno.addSignalListener
addSignalListener(
signal: Signal,
handler: () => void,
): void
Registers the given function as a listener of the given signal event. ```ts Deno.addSignalListener( "SIGTERM", () => { console.log("SIGTERM!") } ); ``` _Note_: On Windows only `"SIGINT"` (CTRL+C) and `"SIGBREAK"` (CTRL+Break) are supported.

Parameters

signal: Signal
handler: () => void

Return Type

void