function Deno.addSignalListener

Registers the given function as a listener of the given signal event.

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

NOTE: This functionality is not yet implemented on Windows.

Parameters

signal: Signal
handler: () => void