Closed Bug 592750 Opened 14 years ago Closed 14 years ago

kill_process_by_name should be made sane or just kill it

Categories

(Testing :: Mozbase, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: k0scist, Assigned: k0scist)

Details

kill_process_by_name is a completely insane function, and its written in an insane way: http://github.com/mozautomation/mozmill/blob/master/mozrunner/mozrunner/__init__.py#L115 Firstly, you'll notice that you're effectively doing kill `ps ax | grep '${NAME}' | awk '{print $1}'` This is pretty bad :( For instance, if ${NAME} == 'crashreporter' and I'm running `emacs -nw crashreporter.txt` then I just killed my emacs. The function is also internally insane. The function is also only used in one place: http://github.com/mozautomation/mozmill/blob/master/mozrunner/mozrunner/__init__.py#L469 The function is also overloaded for windows and called from the master function. Overall, this is a lot of code for one usage case that is hard to read and buggy.
Assignee: nobody → jhammel
See also bug 616383
Group: mozilla-corporation-confidential
I still don't see a reason why this should be confidential. Can you please enlighten (at least) me?
(In reply to comment #2) > I still don't see a reason why this should be confidential. Can you please > enlighten (at least) me? Oops, shouldn't be. Must have mis-clicked
Group: mozilla-corporation-confidential
its dead now, see bug 616383
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WORKSFORME
Whiteboard: [mozmill-2.0?]
You need to log in before you can comment on or make changes to this bug.