Right now we just check if the file exists. So even if the previous process failed in error, and the pidfile just wasn't cleaned up, it still exits and tells your to run --force.
That's unnecessary. We can just lookup the PID to see if the process is alive and delete the pidfile if not.
Right now we just check if the file exists. So even if the previous process failed in error, and the pidfile just wasn't cleaned up, it still exits and tells your to run
--force
.That's unnecessary. We can just lookup the PID to see if the process is alive and delete the pidfile if not.