Closed Bug 634375 Opened 13 years ago Closed 13 years ago

kill plugin-container if it's in the way

Categories

(Firefox for Android Graveyard :: General, defect)

x86
Android
defect
Not set
normal

Tracking

(fennec2.0+)

RESOLVED FIXED
Tracking Status
fennec 2.0+ ---

People

(Reporter: taras.mozilla, Assigned: blassey)

Details

Attachments

(1 file)

I got "an error occured when trying to load files required to run fennec" killall plugin-container fixed it. Should teach fennec to do that.
tracking-fennec: --- → 2.0+
Assignee: nobody → blassey.bugs
Attached patch patchSplinter Review
I don't know of a java api to get all running processes, so this patch reads the children of /proc. Also, android's implementation of java doesn't have PosixFileAttributes, so seeing if environ file is readable by our process is my test of whether or not the process has the same user id as us.
Attachment #513372 - Flags: review?(doug.turner)
Comment on attachment 513372 [details] [diff] [review]
patch

android.permission.KILL_BACKGROUND_PROCESSES is probably not needed, right?

killAnyZombies should be wrapped with a try{}.

not sure why we have haveKilledZombies.  Why do we only want to kill zombies once?

the test for |!p.getName().equals("self")| can be done before creating pEnv.

The test for |pEnv.canRead()| needs to be commented in the code.  I am also very very scared about this.  If at some point the fennec process can read these files, we will attempt to kill these processes.  Can we instead (also?) look at the stat file?  There is the process name in there.

the curly braces are messed up a bit on the patch.
Attachment #513372 - Flags: review?(doug.turner) → review-
(In reply to comment #2)
> Comment on attachment 513372 [details] [diff] [review]
> patch
> 
> android.permission.KILL_BACKGROUND_PROCESSES is probably not needed, right?
yup, removing

> killAnyZombies should be wrapped with a try{}.
as discussed on the phone, not needed

> not sure why we have haveKilledZombies.  Why do we only want to kill zombies
> once?
yup, don't need to do it more than once. The problem we're trying to fix is left over processes from a previous run.

> the test for |!p.getName().equals("self")| can be done before creating pEnv.
> 
> The test for |pEnv.canRead()| needs to be commented in the code.  I am also
> very very scared about this.  If at some point the fennec process can read
> these files, we will attempt to kill these processes.  Can we instead (also?)
> look at the stat file?  There is the process name in there.
what do you want to stat?
> the curly braces are messed up a bit on the patch.
Attachment #513372 - Flags: review- → review+
pushed http://hg.mozilla.org/mozilla-central/rev/7e2360c48bba
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: