Closed Bug 554570 Opened 14 years ago Closed 14 years ago

cfx should cleanup any spawned processes in case of timeouts, ctrl-c or other unusual errors

Categories

(Add-on SDK Graveyard :: General, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 554842

People

(Reporter: avarma, Unassigned)

References

Details

In cuddlefish.runner.run_app(), there's currently a TODO for killing spawned processes in case of timeout. We also should probably catch keyboard interrupts and other unusual errors during the wait loop and make sure we kill spawned processes before quitting.
While bug 554241 doesn't seem like a blocker semantically, its patch actually contains code that a fix to this bug will need to rely on.
Depends on: 554241
Ok, now that bug 554341 is out of the way, this bug now depends on resolving bug 554842.

In fixing that one, it looks like killableprocess.Popen.kill() doesn't necessarily kill Firefox on OS X: once Firefox is launched as an application, its parent is pid 1 and it's no longer in the process group of the process that we launched as 'firefox-bin'. In fact, firefox-bin seems to exit almost immediately, and we have no way of finding the Firefox application that just launched. Might want to ask Josh Aas or Mikeal about this. In the worst case, we can have the harness.js component write its PID to the result file, but it'd be nice to find a solution that doesn't require something on Firefox's end to inform the runner of process IDs.
Oops, at the beginning of the last comment I meant to refer to bug 554241, not 554341.
Oh, never mind the second paragraph of comment 2. Just figured out that Runner.kill() is doing this for us.
Marking this as a duplicate of bug 554842. It's not *technically* duplicate, but the fix for that bug also fixes this one.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
The Add-on SDK is no longer a Mozilla Labs experiment and has become a big enough project to warrant its own Bugzilla product, so the "Add-on SDK" product has been created for it, and I am moving its bugs to that product.

To filter bugmail related to this change, filter on the word "looptid".
Component: Jetpack SDK → General
Product: Mozilla Labs → Add-on SDK
QA Contact: jetpack-sdk → general
Version: Trunk → unspecified
You need to log in before you can comment on or make changes to this bug.