[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Sheflug] Re: Fetchmail
> Any of:
>
> killall fetchmail
> ps aux | grep fetchmail | cut -b10-14 - | xargs -l1 kill
> fetchmail -q
>
Just a minor point, but important (but not completely relevent either)...
On some systems (Solaris being one) killall does not accept a program name
as an argument; killall just does exactly what it's named to do. Kill all
running processes :)
Also some BSDs (OpenBSD for one) doesn't have a killall.
You have been warned, just in case you ever find yourself with a big UNIX
box to play with :) (there isn't a completely portable way to kill a named
process either, as even the ps pipeline has issues between platforms).
Another point as well, thinking about it, the ps pipeline would be better
off as well with a "grep -v grep" after the "grep fetchmail", as otherwise
you've got a race where you could kill the pipeline prematurely if the
"grep fetchmail" returns itself :)
Chris...
--
\ Chris Johnson \ NP: Atomic 80s - 10. Nik Kershaw - Wouldn't It B
\ cej [at] nightwolf.org.uk ~-----, e Good
\ http://cej.nightwolf.org.uk/ ~-----------------------------------,
\ Redclaw chat - http://redclaw.org.uk - telnet redclaw.org.uk 2000 \____
___________________________________________________________________
Sheffield Linux User's Group -
http://www.sheflug.co.uk/mailfaq.html
GNU the choice of a complete generation.