src: force line buffering for stderr
authorRich Trott <rtrott@gmail.com>
Fri, 6 Nov 2015 22:15:18 +0000 (14:15 -0800)
committerMyles Borins <mborins@us.ibm.com>
Wed, 2 Mar 2016 22:01:11 +0000 (14:01 -0800)
SmartOS does not line buffer stderr by default, or at least that is the
behavior on the Node project Jenkins server. Force line buffering. This
resolves the flakiness observed on SmartOS for
test-debug-signal-cluster.

PR-URL: https://github.com/nodejs/node/pull/3701
Fixes: https://github.com/nodejs/node/issues/2476
Refs: https://github.com/nodejs/node/pull/3615
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
src/node_main.cc
test/parallel/parallel.status

index 13a70b2..58e747e 100644 (file)
@@ -41,6 +41,7 @@ int wmain(int argc, wchar_t *wargv[]) {
 #else
 // UNIX
 int main(int argc, char *argv[]) {
+  setvbuf(stderr, NULL, _IOLBF, 1024);
   return node::Start(argc, argv);
 }
 #endif
index 0854238..7e83494 100644 (file)
@@ -18,7 +18,6 @@ test-tick-processor     : PASS,FLAKY
 [$system==macos]
 
 [$system==solaris] # Also applies to SmartOS
-test-debug-signal-cluster         : PASS,FLAKY
 
 [$system==freebsd]