Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Daemon: Fix false-positive of stopped daemon in
verdi daemon status
(…
…aiidateam#5862) A number of `verdi` commands will check whether the daemon process ID, which is stored in a PID-file, has gone stale in which case it is removed and the daemon is considered stopped. The check is based on the PID written in the file still existing but to be sure the same PID hadn't be recycled for another process (unlikely but possible) it compared the command name of the process with what it would expect. The expected command is `start-circus` since that is the `verdi` command that is launched by `verdi daemon start`. However, on certain machines (for reasons as of yet unknown) the command name is `circusd` instead. In this case, the `delete_stale_pid_file` utility would always conclude the PID was stale and so remove the PID-file. This would result in `verdi daemon status` to always say the daemon is not running (since it simply checks the existance of a PID-file) even though multiple daemon processes would be running in the background (which could also not be killed through `verdi`).
- Loading branch information