Deno.addSignalListener

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.

function addSignalListener(signal: Signal, handler: () => void): void;
§
addSignalListener(signal: Signal, handler: () => void): void
[src]

§Parameters

§
handler: () => void
[src]

§Return Type