PID file gets overwritten even if the launch is unsuccessful.
When launching lighttpd and another lighttpd process is running. The second lighttpd process overwrites the first process pidfile and then dies with "cannot bind to port", and leaves the pidfile empty. Now, when a scripts wants to terminate the first lighttpd process using the pidfile, it cannot do so because there is no content in the pidfile.
Also available in: Atom