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