function Deno.addSignalListener
Jump to headingaddSignalListener(signal: Signal,handler: () => void,): void
Registers the given function as a listener of the given signal event.
Deno.addSignalListener(
"SIGTERM",
() => {
console.log("SIGTERM!")
}
);
Note: On Windows only "SIGINT"
(CTRL+C) and "SIGBREAK"
(CTRL+Break)
are supported.
Parameters Jump to heading
Jump to headingsignal: Signal
Jump to headinghandler: () => void
Return Type Jump to heading
void