From 24650e4887ed7372a3119580b9adf59fc46b312d Mon Sep 17 00:00:00 2001 From: "jwalden%mit.edu" Date: Tue, 13 Feb 2007 21:16:09 +0000 Subject: [PATCH] Bug 370028 - Unbuffer stdout in xpcshell so that its output during unit tests is in execution order. r+sr=brendan git-svn-id: svn://10.0.0.236/trunk@220079 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/js/src/xpconnect/shell/xpcshell.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mozilla/js/src/xpconnect/shell/xpcshell.cpp b/mozilla/js/src/xpconnect/shell/xpcshell.cpp index 7b5b471af12..d86ae37796f 100644 --- a/mozilla/js/src/xpconnect/shell/xpcshell.cpp +++ b/mozilla/js/src/xpconnect/shell/xpcshell.cpp @@ -964,6 +964,10 @@ main(int argc, char **argv, char **envp) int result; nsresult rv; + // unbuffer stdout so that output is in the correct order; note that stderr + // is unbuffered by default + setbuf(stdout, 0); + gErrFile = stderr; gOutFile = stdout; {