Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/juliangruber/blocking-stdio
Make nodejs stdio blocking (again!)
https://github.com/juliangruber/blocking-stdio
Last synced: 19 days ago
JSON representation
Make nodejs stdio blocking (again!)
- Host: GitHub
- URL: https://github.com/juliangruber/blocking-stdio
- Owner: juliangruber
- Created: 2016-05-26T12:46:16.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-05-26T12:47:56.000Z (over 8 years ago)
- Last Synced: 2024-10-20T14:59:03.366Z (23 days ago)
- Language: JavaScript
- Size: 1.95 KB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# blocking-stdio
Since node 6, stdio is non blocking by default. Besides having several advantages, one obvious disatvantage is that sometimes the program exits before all output has been printed. This module changes it back to blocking!
## Usage
Include this at the top of your process:
```js
require('blocking-stdio')();
```## Warning
Do __NOT__ include this in a library. This module modifies global state and thus should __ONLY__ be used in an application. Don't modify global stuff in libraries, people.
## Kudos
Thanks @isaacs! [https://twitter.com/izs/status/732317861067153408](https://twitter.com/izs/status/732317861067153408).
## License
MIT