graceful exit process even parent exit on SIGKILL.
npm i graceful-process
Require this module and execute it on every child process file.
// mycli.js
const { graceful } = require('graceful-process');
graceful({ logger: console, label: 'mycli-child-cmd' });
- cluster
- child_process.fork()
- child_process.spawn()
Made with contributors-img.