mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-01 17:23:59 +00:00
Bug 950401 - Add process logging to OS X / BSD. r=bsmedberg
MozReview-Commit-ID: bEPQabbSP1 --HG-- extra : rebase_source : 115312fdb0f29a5914c5dcccb9d7ba7eae943ce0
This commit is contained in:
parent
faf31d5017
commit
73b62156c7
@ -17,6 +17,12 @@
|
||||
#include "nspr.h"
|
||||
#include "base/eintr_wrapper.h"
|
||||
|
||||
namespace {
|
||||
|
||||
static mozilla::EnvironmentLog gProcessLog("MOZ_PROCESS_LOG");
|
||||
|
||||
} // namespace
|
||||
|
||||
namespace base {
|
||||
|
||||
void FreeEnvVarsArray(char* array[], int length)
|
||||
@ -135,6 +141,8 @@ 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));
|
||||
|
||||
|
@ -18,6 +18,12 @@
|
||||
#include "base/string_util.h"
|
||||
#include "base/time.h"
|
||||
|
||||
namespace {
|
||||
|
||||
static mozilla::EnvironmentLog gProcessLog("MOZ_PROCESS_LOG");
|
||||
|
||||
} // namespace
|
||||
|
||||
namespace base {
|
||||
|
||||
void FreeEnvVarsArray(char* array[], int length)
|
||||
@ -170,6 +176,8 @@ 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));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user