$ cnpm install graceful-process
graceful exit process even parent exit on SIGKILL.
npm i graceful-process --save
Require this module and execute it on every child process file.
// mycli.js
require('graceful-process')({ logger: console, label: 'mycli-child-cmd' });
Copyright 2013 - present © cnpmjs.org