Opened 9 years ago
Closed 9 years ago
#15401 closed defect (fixed)
Build no longer propagates exit code to shell when using node 0.6+
Reported by: | Ben Lowery | Owned by: | Rawld Gill |
---|---|---|---|
Priority: | high | Milestone: | 1.8 |
Component: | BuildSystem | Version: | 1.7.2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Node 0.6+ no longer fires 'close' on the stdout stream when closing, but it does wait for stdout to drain before exiting. The node variant of the build hooks 'close' to set the process exit code, but since this event no longer fires, it never gets set.
Attached is a patch that properly exits the process, setting the exit code in a backwards compat way. If we only care about the current version of node, we can drop the try.
CLA on file, etc.
Attachments (1)
Change History (4)
Changed 9 years ago by
Attachment: | process.patch added |
---|
comment:1 Changed 9 years ago by
Milestone: | tbd → 1.8 |
---|---|
Priority: | undecided → high |
Status: | new → assigned |
comment:2 Changed 9 years ago by
Somewhere along the way in node's evolution, stdout became blocking. I'm not sure that it was nonblocking in some early versions was intentional, a bug, or some anomaly on the systems I was developing on. In any event, the hack of necessarily waiting for stdout to drain before calling exit is no longer required so I'm going to remove that whole idea to keep the code clean.
If someone happens to be using a very old version of node.js that doesn't drain stdout, and consequently, is missing output, then the soln is to upgrade to a current version of node.js.
patch against util