Preparing for system design interviews?  Try bugzed.com →

Node Process Cleanup Handler

JSON →
library 2.1.2 ·javascript
verified Jun 17, 2026

The `node-cleanup` package provides a mechanism to install custom cleanup handlers that execute when a Node.js process exits. This includes normal termination (exit code 0), error-induced exits (uncaught exceptions, exit code 1), and receipt of POSIX signals such as SIGINT (Ctrl-C), SIGHUP, SIGQUIT, and SIGTERM. The current stable version is 2.1.2, released recently, following a "complete rewrite" in version 2.1.0. Its release cadence appears to be driven by feature enhancements and major architectural changes rather than strict time intervals. Key differentiators include support for multiple independent handlers, asynchronous cleanup for signals (allowing postponement of process termination), delegation of termination decisions to child processes (useful for scenarios with tools like Emacs), and custom `stderr` messages for Ctrl-C and uncaught exceptions. The library focuses on robust and reliable process shutdown management in various scenarios.

total hits 9
actors 3 distinct systems
last hit 18d ago AhrefsBot
GPTBot
4
Script
1

top countries 🇨🇦 Canada · 🇺🇸 United States · 🇩🇪 Germany