
* Dominic Tennant <bnonn(a)orcon.net.nz> [2006-05-22 10:00]:
Any particular reason you're using kill -9, btw?
Indeed; cf. http://sial.org/howto/shell/kill-9/ and http://laku19.adsl.netsonic.fi/~era/unix/award.html#uuk9letter
Wouldn't a normal sigterm do the job? And isn't it easier to use killall xmms, rather than funky things with kill?
In this particular case, the right thing is to say `kill %%`, since `%%` refers to the last stopped or backgrounded process. This is precise and won’t go around killing random other processes that happen to have the same name as the one you want. In the case of killing xmms, there probably won’t be others, but if you get into the habit of killing processes by name in scripts you’re guaranteed to give yourself a nasty surprise someday. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/>