bug 950401 - Log child process spawning on Mac/BSD. r=bsmedberg

This commit is contained in:
Bill McCloskey 2015-03-25 07:10:36 -04:00
parent 84dfd4ce42
commit ae40046d93
2 changed files with 8 additions and 0 deletions

View File

@ -180,6 +180,9 @@ bool LaunchApp(const std::vector<std::string>& argv,
if (!spawn_succeeded || !process_handle_valid) {
retval = false;
} else {
gProcessLog.print("==> process %d launched child process %d\n",
GetCurrentProcId(), pid);
if (wait)
HANDLE_EINTR(waitpid(pid, 0, 0));

View File

@ -18,6 +18,8 @@
#include "base/string_util.h"
#include "base/time.h"
static mozilla::EnvironmentLog gProcessLog("MOZ_PROCESS_LOG");
namespace base {
void FreeEnvVarsArray(char* array[], int length)
@ -169,6 +171,9 @@ bool LaunchApp(const std::vector<std::string>& argv,
if (!spawn_succeeded || !process_handle_valid) {
retval = false;
} else {
gProcessLog.print("==> process %d launched child process %d\n",
GetCurrentProcId(), pid);
if (wait)
HANDLE_EINTR(waitpid(pid, 0, 0));