graceful-kill
TypeScript icon, indicating that this package has built-in type declarations

8.1.0 • Public • Published

graceful-kill

gracefully kills a spawn process

Install

npm install --save graceful-kill

Usage

import { spawn } from 'child_process';
import gracefulKill from 'graceful-kill';

const process = spawn('sleep', [99999]);

process.on('SIGINT', () => {
  gracefulKill(process).then(() => {
    process.exit(0);
  });
});

Readme

Keywords

none

Package Sidebar

Install

npm i graceful-kill

Weekly Downloads

136

Version

8.1.0

License

ISC

Unpacked Size

21 kB

Total Files

13

Last publish

Collaborators

  • churpeau