exit / 0.1.2 last updated a year ago created on Sep 20th 2013
Install
npm install --save exit
Clone
git clone git@github.com:cowboy/node-exit.git
dependencies
No dependencies listed.
maintainers
versions
| 0.1.2 | a year ago | cowboy |
| 0.1.1 | 2 years ago | cowboy |
| 0.1.0 | 2 years ago | cowboy |
readme
exit 
A replacement for process.exit that ensures stdio are fully drained before exiting.
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 for further reference.
Tested in OS X 10.8, Windows 7 on Node.js 0.8.25 and 0.10.18.
Based on some code by @vladikoff.
Getting Started
Install the module with: npm install exit
Don't believe me? Try it for yourself.
In Windows, clone the repo and cd to the test\fixtures directory. The only difference between log.js and log-broken.js is that the former uses exit while the latter calls process.exit directly.
Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.
Release History
2013-09-20 - v0.1.0 - Initial release.
License
Copyright (c) 2013 "Cowboy" Ben Alman
Licensed under the MIT license.