-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improve process.exit()
workaround
#2741
Conversation
- use public API - fix issue with Node.js 0.10 on WIndows
Can this fix only be applied to node 0.10 and keep the old way for other versions? By not calling |
This workaround is closer to the documented advice and the workaround I referenced above. Note that
It is then just a matter of waiting on the event loop for the two streams to be completely drained before calling |
I am familiar with that documented advice. Much of it is wrong. Due to a basic node flaw it won't flush stdout/stderr for uncaught exceptions for latest versions of node, nor for |
The event loop is no longer running for an uncaught exception and |
|
I understand that the actual uncaught exception would have its I'm not trying to write anything out for that |
I'm not worried about the tests but for normal uglify use. In the event of exception or Can the fix in this PR only be applied to the test runner and revert the old |
Can you prove this PR actually breaks normal usage? Some of the |
Testing aside, the real question is whether this new way works for normal uglify CLI use in all situations with all node versions on all OSes. I wasted enough of my life in the node and libuv projects trying to fix this very issue. I gave up:
I can appreciate that's a problem. |
I do notice & appreciate your heroic efforts in trying to get I'm planning to take some risk and see what breaks, and if so to come up with some You probably know this already, but usage of |
Unfortunately the |
Why are we concerned with |
AFAICT |
I stand corrected. I know |
Specifically, you did? 👻 |
Back when To your point, perhaps for
Both uglify and Let's go with your fix and see if anyone notices a problem. |
Related:
#1061
mochajs/mocha#333 (comment)