Using Node.js v0.4.10 on Ubuntu.
If I write a large amount of data to stdout, either via console.log() or process.stdout.write(), and then try to redirect the output to a file, the file remains empty even though the output never appears in the console. I'm not forcing the process to exit, it's completing its task and then exiting on its own. I expected stdout to flush at this point, but it appears not to.
This behavior can be seen with CSS Lint v0.5.0
npm install [email protected]
csslint some_css_file.css > results.txt
I tried working around this by using:
fs.writeSync(1, message);
However, this is causing other errors.
Is this behavior expected? If so, how can I ensure stdout is flushed so that output can be captured as usual?
Using Node.js v0.4.10 on Ubuntu.
If I write a large amount of data to stdout, either via console.log() or process.stdout.write(), and then try to redirect the output to a file, the file remains empty even though the output never appears in the console. I'm not forcing the process to exit, it's completing its task and then exiting on its own. I expected stdout to flush at this point, but it appears not to.
This behavior can be seen with CSS Lint v0.5.0
I tried working around this by using:
However, this is causing other errors.
Is this behavior expected? If so, how can I ensure stdout is flushed so that output can be captured as usual?