Closed Bug 979741 Opened 10 years ago Closed 10 years ago

Use MOZ_DEBUG_CHILD_PROCESS environment variable to stop child forked from Nuwa

Categories

(Core :: IPC, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla30

People

(Reporter: cyu, Assigned: cyu)

References

Details

Attachments

(1 file, 1 obsolete file)

In XRE_InitChildProcess() we check the presence of "MOZ_DEBUG_CHILD_PROCESS". If present, we sleep and print out the PID to let developers has the chance to attach to it with a debugger. Nuwa uses #ifdef to do this. We should follow the way the convention in XRE_InitChildProcess().
Assignee: nobody → cyu
Attachment #8386034 - Flags: review?(khuey)
See Also: → 939562
Comment on attachment 8386034 [details] [diff] [review]
Pause Nuwa-spawned child processes by observing the env variable

Review of attachment 8386034 [details] [diff] [review]:
-----------------------------------------------------------------

::: mozglue/build/Nuwa.cpp
@@ +1561,5 @@
>      CloseAllProtoSockets(sProtoFdInfos, sProtoFdInfosSize);
>    } else {
>      // in the child
> +    if (getenv("MOZ_DEBUG_CHILD_PROCESS")) {
> +      printf("\n\nNUWA CHILDCHILDCHILDCHILD\n  debug me @%d\n\n", getpid());

please add a space between between '@' and '%d' to make blake happy.
Attachment #8386034 - Flags: review?(khuey) → review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/230cfcce538f
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: