[CVS] pidfile support

Carson Gaspar carson at taltos.org
Tue Dec 17 19:50:15 EST 2002



--On Tuesday, December 17, 2002 1:12 PM -0200 Henrique de Moraes Holschuh 
<hmh at debian.org> wrote:

> [A] 1. stat pidfile
>     2. file exists?
>     2a (yes) - read pid from file, kill(pid,0) it
>     2a1      - kill says process exists? fail to start if so

No no no. You must check and see if the PID that exists is sane - e.g. has 
the correct process name. Otherwise, you can get into a situation where you 
never restart at reboot, if some other process has that PID.

-- 
Carson





More information about the Info-cyrus mailing list