Closed Bug 483626 Opened 11 years ago Closed 11 years ago
IProcess .is Running doesn't fail correctly and should be boolean
isRunning should be a boolean attribute and in certain cases it doesn't report failures back to the caller.
This covers a few problems in nsIProcess. In particular: nsIProcess.kill should throw if the process hasn't been started or has already been killed (I'm throing NS_ERROR_NOT_INITIALIZED to distinguish from a real failure to kill). isRunning should be a boolean. mProcess is only used on non windows API, so remove it from the class there. GetIsRunning can bail out quickly if we have never started the process, or already killed it. If the return from GetExitCodeProcess indicates a failure then we should pass that failure back. GetPid shouldn't modify the out parameter when it returns a failure. A bit of tidying up in Kill, and close the thread handle when done. A few cleanups in the tests to make failures easier to trace back to the specific checks.
Assignee: nobody → dtownsend
Status: NEW → ASSIGNED
Attachment #367633 - Flags: review?(benjamin)
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2a1
Comment on attachment 367633 [details] [diff] [review] patch rev 1 This corrects a few oddities with bug 442393 and so if we take that we should take this on 1.9.1 too.
Attachment #367633 - Flags: approval1.9.1?
Comment on attachment 367633 [details] [diff] [review] patch rev 1 a191=beltzner
Attachment #367633 - Flags: approval1.9.1? → approval1.9.1+
Landed on the branch: http://hg.mozilla.org/releases/mozilla-1.9.1/rev/c387b925a275
You need to log in before you can comment on or make changes to this bug.