I see a lot of programs that does write a pidfile, and check at boot its existence. And this is good. But many application does not start even if they check that the pidfile exists, yes, but no process with that pid is running.
Why this behavior? Is it not more simple to remove the pidfile and warn the user, at most?