Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/node_main.cc')
-rw-r--r--src/node_main.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/node_main.cc b/src/node_main.cc
index 02082ba0169..bde39756249 100644
--- a/src/node_main.cc
+++ b/src/node_main.cc
@@ -50,7 +50,10 @@ int wmain(int argc, wchar_t *wargv[]) {
#else
// UNIX
int main(int argc, char *argv[]) {
- setvbuf(stderr, NULL, _IOLBF, 1024);
+ // Disable stdio buffering, it interacts poorly with printf()
+ // calls elsewhere in the program (e.g., any logging from V8.)
+ setvbuf(stdout, nullptr, _IONBF, 0);
+ setvbuf(stderr, nullptr, _IONBF, 0);
return node::Start(argc, argv);
}
#endif