import { onSignal } from "https://deno.land/std@0.108.0/signal/mod.ts";
Registers a callback function to be called on triggering of a signal event.
import { onSignal } from "./mod.ts";
const handle = onSignal("SIGINT", () => {
console.log('Received SIGINT');
handle.dispose(); // de-register from receiving further events
});