Btw, it is possible to suspend Unix processes from the command line by sending them the SIGSTOP signal.
;playing a song with iTunes
$ ps ax | grep iTunes
401 ?? S 5:29.21 /Applications/iTunes.app/Contents/MacOS/iTunes -psn_0_213044
$ kill -STOP 401
;the song stops playing, and iTunes's CPU usage drops to zero
$ kill -CONT 401
;the song resumes exactly where it was
I've done this to, say, Firefox, and resumed it sometime later with no ill effects that I've been able to detect. (Firefox usually has a secondary Flash plugin process; the interaction between the two when one is suspended is kind of interesting, but seemingly benign.)
I've found this useful when I've wanted to throttle some application's CPU/other resource usage (usually on a laptop) but didn't want to completely quit it. Also it's just kind of awesome.
I've found this useful when I've wanted to throttle some application's CPU/other resource usage (usually on a laptop) but didn't want to completely quit it. Also it's just kind of awesome.