On Wed, May 21, 2008 at 10:40:49PM +0900, Daniel Berger wrote:
> I've wasted a lot of time with pid files...

Hear hear. You could also use a process manager such as daemontools or runit -
that's generally what I do.

-- 
Jos Backus
jos at catnook.com