-
-
Notifications
You must be signed in to change notification settings - Fork 33.9k
Description
- v6.0.0:
- OS X 10.11.4:
- process:
I wrote a config loader called milieu which has a feature that prints a table displaying the key, value, and value of all the config value. Here's an example from Node v5.5.0:

I upgraded to Node v6.0.0 and noticed that this table now looks like this:

When the library detects a --explain-config flag it prints the table and exits the program. Below is a snippet of code from the library that does the former.
...
if (this.argv['explain-config']) {
delete this.argv['explain-config'];
this.printExplainTable();
process.exit(0);
}
...Basically the printExplainTable method prints the table to with process.stdoutconsole.log. The idea here was that stdout would block until the table is printed to the shell, then process.exit(0) is called to stop the server/program from starting.
It seems that stdout no longer blocks. If stdout does not block, is there a method to know when the stdout has been flushed? I tried using the 'drain' event the the stdout stream, but that doesn't seem to fire.
Seems like a bug. Any thoughts?