Last Updated: February 25, 2016
·
521
· cristian

Revive irresponsive apps on OSX

Once in a while your apps freeze. Usually, I just sighed and force-quit the app. Not any more. Let's suppose Firefox is frozen:

ps caux | grep Firefox
user           44571   0.0  3.8  3646480 316152   ??  S     9:26PM   0:07.68 /Users/user/Applications/Firefox.app
# rise!!!
kill -CONT 44571

I found useful to create a function and place it in your .zshrc or .bashrc:

revive () {
    ps caux | grep $1 | awk '{print $2}' | while read i
    do
        kill -CONT $i
    done
}

That will handle cases in which there are many matches (like reviving Google Chrome which runs many processes).

1 Response
Add your response

cool thx :)

over 1 year ago ·