IsOwnedDaemon reports whether the PID file points to a codemap watch daemon for this repository root. It is true only when ownership is positively confirmed.
(root string)
| 114 | // for this repository root. It is true only when ownership is positively |
| 115 | // confirmed. |
| 116 | func IsOwnedDaemon(root string) bool { |
| 117 | pid, err := ReadPID(root) |
| 118 | if err != nil || pid <= 0 { |
| 119 | return false |
| 120 | } |
| 121 | return daemonOwnershipForPID(root, pid) == ownershipOwned |
| 122 | } |
| 123 | |
| 124 | // IsRunning checks if the daemon is running |
| 125 | func IsRunning(root string) bool { |