Temporary spew part 2: convert fprintf(stderr into printf( so that child output shows up in the log.
☠☠ backed out by e5ca69832b93 ☠ ☠
authorChris Jones <jones.chris.g@gmail.com>
Fri, 22 Jan 2010 15:31:56 -0600
changeset 46572 f861b6e0a3641064e10db99863e4edce34fbba4d
parent 46571 8d0ad9632fd2ba1343051752d1ae0aa0c536ffe3
child 46573 b0fee4f9b8c7ec241a0617577c5256e0774802b0
child 46607 e5ca69832b937f2a5b1942db6859fe501628b9cf
push idunknown
push userunknown
push dateunknown
milestone1.9.3a1pre
Temporary spew part 2: convert fprintf(stderr into printf( so that child output shows up in the log.
dom/plugins/PluginModuleChild.cpp
ipc/chromium/src/base/process_util_linux.cc
ipc/chromium/src/chrome/common/process_watcher_posix_sigchld.cc
toolkit/xre/nsAppRunner.cpp
toolkit/xre/nsEmbedFunctions.cpp
--- a/dom/plugins/PluginModuleChild.cpp
+++ b/dom/plugins/PluginModuleChild.cpp
@@ -280,17 +280,17 @@ void
 PluginModuleChild::ActorDestroy(ActorDestroyReason why)
 {
     // doesn't matter why we're being destroyed; it's up to us to
     // initiate (clean) shutdown
 
 
 
 #ifdef OS_LINUX
-    fprintf(stderr, "TEST-UNEXPECTED-FAIL | plugin process %d | initiating shutdown\n", getpid());
+    printf("TEST-UNEXPECTED-FAIL | plugin process %d | initiating shutdown\n", getpid());
 #endif
 
 
 
     XRE_ShutdownChildProcess();
 }
 
 void
--- a/ipc/chromium/src/base/process_util_linux.cc
+++ b/ipc/chromium/src/base/process_util_linux.cc
@@ -59,17 +59,17 @@ bool LaunchApp(const std::vector<std::st
 #if defined(CHROMIUM_MOZILLA_BUILD)
     // if we get here, we're in serious trouble and should complain loudly
     DLOG(ERROR) << "FAILED TO exec() CHILD PROCESS, path: " << argv_cstr[0];
 #endif
     exit(127);
   } else {
 
 
-      fprintf(stderr, "TEST-UNEXPECTED-FAIL | ==> process %d launched | child process %d\n", GetCurrentProcId(), pid);
+      printf("TEST-UNEXPECTED-FAIL | ==> process %d launched | child process %d\n", GetCurrentProcId(), pid);
 
 
 
     gProcessLog.print("==> process %d launched child process %d\n",
                       GetCurrentProcId(), pid);
     if (wait)
       HANDLE_EINTR(waitpid(pid, 0, 0));
 
--- a/ipc/chromium/src/chrome/common/process_watcher_posix_sigchld.cc
+++ b/ipc/chromium/src/chrome/common/process_watcher_posix_sigchld.cc
@@ -193,17 +193,17 @@ public:
   virtual void OnSignal(int sig)
   {
     ChildReaper::OnSignal(sig);
 
     if (!process_) {
 
 
 
-      fprintf(stderr, "TEST-UNEXPECTED-FAIL | process %d reaped | child process (got SIGCHLD, exited normally)\n", getpid());
+      printf("TEST-UNEXPECTED-FAIL | process %d reaped | child process (got SIGCHLD, exited normally)\n", getpid());
 
 
 
 
       MessageLoop::current()->RemoveDestructionObserver(this);
       delete this;
     }
   }
@@ -212,17 +212,17 @@ public:
   virtual void WillDestroyCurrentMessageLoop()
   {
     DCHECK(process_);
 
     WaitForChildExit();
 
 
 
-    fprintf(stderr, "TEST-UNEXPECTED-FAIL | process %d reaped | child process (waitpid() on shutdown)\n", getpid());
+    printf("TEST-UNEXPECTED-FAIL | process %d reaped | child process (waitpid() on shutdown)\n", getpid());
 
 
 
     process_ = 0;
 
     // XXX don't think this is necessary, since destruction can only
     // be observed once, but can't hurt
     MessageLoop::current()->RemoveDestructionObserver(this);
@@ -259,17 +259,17 @@ ProcessWatcher::EnsureProcessTerminated(
 {
   DCHECK(process != base::GetCurrentProcId());
   DCHECK(process > 0);
 
   if (IsProcessDead(process)) {
 
 
 
-    fprintf(stderr, "TEST-UNEXPECTED-FAIL | process %d reaped | child process %d (it was already dead)\n", getpid(), process);
+    printf("TEST-UNEXPECTED-FAIL | process %d reaped | child process %d (it was already dead)\n", getpid(), process);
 
 
 
     return;
   }
 
   MessageLoopForIO* loop = MessageLoopForIO::current();
   if (force) {
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -3593,17 +3593,17 @@ XRE_main(int argc, char* argv[], const n
   XRE_DeinitCommandLine();
 
 
 
 
 
 
 #ifdef OS_LINUX
-  fprintf(stderr, "TEST-UNEXPECTED-FAIL | browser process %d | exiting\n", getpid());
+  printf("TEST-UNEXPECTED-FAIL | browser process %d | exiting\n", getpid());
 #endif
 
 
 
 
 
   return NS_FAILED(rv) ? 1 : 0;
 }
--- a/toolkit/xre/nsEmbedFunctions.cpp
+++ b/toolkit/xre/nsEmbedFunctions.cpp
@@ -368,17 +368,17 @@ XRE_InitChildProcess(int aArgc,
 
     sIOMessageLoop->Run();
 
     sIOMessageLoop = nsnull;
   }
 
 
 #ifdef OS_LINUX
-  fprintf(stderr, "TEST-UNEXPECTED-FAIL | plugin process %d | IO thread joined XPCOM thread, exiting\n", getpid());
+  printf("TEST-UNEXPECTED-FAIL | plugin process %d | IO thread joined XPCOM thread, exiting\n", getpid());
 #endif
 
 
 
   NS_LogTerm();
   return XRE_DeinitCommandLine();
 }
 
@@ -509,17 +509,17 @@ XRE_ShutdownChildProcess()
     MessageLoop* ioLoop = XRE_GetIOMessageLoop();
     NS_ABORT_IF_FALSE(!!ioLoop, "Bad shutdown order");
 
     ioLoop->PostTask(FROM_HERE, new MessageLoop::QuitTask());
 
 
 
 #ifdef OS_LINUX
-    fprintf(stderr, "TEST-UNEXPECTED-FAIL | plugin process %d | posted quit task to IO thread\n", getpid());
+    printf("TEST-UNEXPECTED-FAIL | plugin process %d | posted quit task to IO thread\n", getpid());
 #endif
 
 
 
 }
 
 namespace {
 TestShellParent* gTestShellParent = nsnull;