jprichardson / jprichardson/node-death
Fails with piping
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 182
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
$ node script.js | tee script.log
^Cevents.js:163
throw er; // Unhandled 'error' event
^
Error: write EPIPE
at exports._errnoException (util.js:1050:11)
at WriteWrap.afterWrite [as oncomplete] (net.js:814:14)
The script is:
var ON_DEATH = require('death'); //this is intentionally ugly
ON_DEATH(function(signal, err) { console.log('croak'); })
setTimeout(function () {}, 10000);
node-cleanup doesn't call my handler either, but at least doesn't display this ugly error message :)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported node script.js | tee script.log command using the provided script.js example and observe the EPIPE output after interruption. Trace the behavior from that reproduction and verify that piping and interrupting the process no longer produces the unhandled error while the cleanup handler's behavior is documented or preserved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100