Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/proc/legacy/runners/signals.ts>exitOnSignal

A better way to work with processes in Deno.
Very Popular
Go to Latest
function exitOnSignal
import { exitOnSignal } from "https://deno.land/x/proc@0.20.41/legacy/runners/signals.ts";

Intercept OS signals and make them a normal exit.

This ensures that unload events are called reliably on most signals that terminate the process. SIGKILL cannot be intercepted.

When Deno exits due to a signal, the OS closes child processes automatically. It is only necessary to use this if unload events must be processed.

This uses unstable APIs.