# kill 2 appz at the same time.



## flacochala (Oct 29, 2005)

Hi guys.. well the thing is very simple, Ive downloaded a little app call M-Beat, its a terrific app because of it functionallity and i use it a lot, but the thing is that it have an incredible number of memory leaks, so if i run it 2 o 3 hs it starts eating your ram like a madporgram. So, the thing is, that i want to kill the app when iTunes is quitted... does anybody know how to kill a program, when another one is quitted? THX!!!


----------



## spb (Oct 29, 2005)

From a terminal use the command:

ps -ax | grep <<application name>>

To get a listing of the running application.  For example:

vesper:~ scott$ ps -ax | grep Safari
  926  ??  S      1:51.92 /Applications/Safari.app/Contents/MacOS/Safari -psn_0_158

The number on the left is the PID of the application.  Use the command

kill -9 <<PID>> 

to kill the application.

For the example above

kill -9 926


----------



## kainjow (Oct 30, 2005)

or just "killall MyApp"


----------



## spb (Oct 30, 2005)

I had no idea about killall!  I took an hour last year to write a cute little script to do exactly this and named it killproc.  Live and learn, I guess. :7)


----------



## flacochala (Oct 30, 2005)

thx.. guys, but i think i didnt explain well what do i want to do... the thing im trying to do is that, when i quit itunes, automatically, kill the other app, like a thread or something alike (i dont know the exact english term).. but i have some ideas with what you posted... thanxs!


----------

