Closed Bug 525065 Opened 10 years ago Closed 10 years ago

Need javascript interface to detect and kill orphaned child processes


(Core :: IPC, defect)

Not set





(Reporter: jgriffin, Unassigned)



Per the discussion in bug 523208 (esp comments 18 - 21), we need a javascript interface that will allow the mochitest test harness to detect orphaned child processes at the end of a test, so that the test can be failed and the process killed.
I do not think we want this to be a JS API. I think the harness itself should check for child processes. I'm sure that we will have an assertion that no child processes remain at shutdown, but that's not nearly as interesting as noticing child processes that we thought were dead but actually weren't.
> I think the harness itself should check for child processes.

Which harness do you mean?  The mochitest harness is javascript.  It's wrapped by a python test runner.  

Do we need to check for orphan child processes at the end of each test case inside of a test run, or only at the end of a test run?

The python test runner doesn't have any knowledge of when particular tests begin or end, so if we need to check this per-test, I don't see a way to do it outside of javascript.  If we only care about checking at the end of a test run, then it can be done in python.
At the end of a test run. Processes will persist between individual tests, since we reuse a single plugin process (for example) for the lifetime of an app.
Ok, I'll close this bug and open a new one re: logging PIDs to a file.
Closed: 10 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.