# graceful-process

> graceful exit process even parent exit on SIGKILL.

Latest version **2.2.0** (published 2025-05-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install graceful-process
pnpm add graceful-process
yarn add graceful-process
bun add graceful-process
```

## Health

**Score 45/100 (D)** — status: maintenance-mode.

Positive: has types; esm support; no vulnerabilities; has provenance; high quality score.

Warnings: low downloads.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.2.0 |
| Published | 2025-05-17 |
| First published | 2017-06-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >= 18.19.0 |
| Dependencies | 1 |
| Unpacked size | 30.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 34 |
| Author | fengmk2 |
| Maintainers | dead-horse, fengmk2, popomore |

## Links

- npm: https://www.npmjs.com/package/graceful-process
- Repository: https://github.com/node-modules/graceful-process
- Homepage: https://github.com/node-modules/graceful-process#readme
- Issues: https://github.com/node-modules/graceful-process/issues
- npm.io page: https://npm.io/package/graceful-process

## Dependencies (1)

- [read-env-value](https://npm.io/package/read-env-value.md) ^1.1.0

## Recent versions

- 2.2.0 (latest) — 2025-05-17
- 1.3.0 (release-1.x) — 2025-04-08
- 2.1.0 — 2025-04-08
- 2.0.0 — 2024-12-15
- 1.2.0 — 2018-03-02
- 1.1.0 — 2018-01-17
- 1.0.0 — 2017-06-12

## README

# graceful-process

[![NPM version](https://img.shields.io/npm/v/graceful-process.svg?style=flat-square)](https://npmjs.org/package/graceful-process)
[![NPM quality](http://npm.packagequality.com/shield/graceful-process.svg?style=flat-square)](http://packagequality.com/#?package=graceful-process)
[![NPM download](https://img.shields.io/npm/dm/graceful-process.svg?style=flat-square)](https://npmjs.org/package/graceful-process)
[![Node.js Version](https://img.shields.io/node/v/graceful-process.svg?style=flat)](https://nodejs.org/en/download/)
[![Continuous Integration](https://github.com/node-modules/graceful-process/actions/workflows/nodejs.yml/badge.svg)](https://github.com/node-modules/graceful-process/actions/workflows/nodejs.yml)
[![Test coverage](https://img.shields.io/codecov/c/github/node-modules/graceful-process.svg?style=flat-square)](https://codecov.io/gh/node-modules/graceful-process)

graceful exit process even parent exit on SIGKILL.

## Install

```bash
npm i graceful-process
```

## Usage

Import this module and execute it on every child process file.

```ts
// mycli.ts
import { graceful } from 'graceful-process';

graceful({ logger: console, label: 'mycli-child-cmd' });
```

## Support

- [x] cluster
- [x] child_process.fork()
- [ ] child_process.spawn()

## Contributors

[![Contributors](https://contrib.rocks/image?repo=node-modules/graceful-process)](https://github.com/node-modules/graceful-process/graphs/contributors)

Made with [contributors-img](https://contrib.rocks).

---
_Source: https://npm.io/package/graceful-process · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
