Handle OS Signals

    APIs for handling OS signals are modelled after already familiar and APIs.

    ⚠️ Note that listening for OS signals doesn’t prevent event loop from finishing, ie. if there are no more pending async operations the process will exit.

    Run with:

      You can use Deno.removeSignalListener() function to unregister previously added signal handler.

      1. deno run signal_listeners.ts

      If you prefer to handle signals using an async iterator, you can use API available in deno_std:

      Run with:

      1. deno run async_iterator_signal.ts