Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

A replacement for process.exit that ensures stdio are fully drained before exiting.

**This module addresses a bug that was [resolved in version 0.12 of Node.js](https://github.com/nodejs/node-v0.x-archive/commit/20176a9). Projects that do not need support for earlier releases of Node.js can use `process.exit` directly, without the support of this module.**

To make a long story short, if `process.exit` is called on Windows, script output is often truncated when pipe-redirecting `stdout` or `stderr`. This module attempts to work around this issue by waiting until those streams have been completely drained before actually calling `process.exit`.

See [Node.js issue #3584](https://github.com/joyent/node/issues/3584) for further reference.
Expand Down