IsRunning checks if the daemon is running
(root string)
| 123 | |
| 124 | // IsRunning checks if the daemon is running |
| 125 | func IsRunning(root string) bool { |
| 126 | pid, err := ReadPID(root) |
| 127 | if err != nil { |
| 128 | return false |
| 129 | } |
| 130 | // Liveness is checked in a platform-specific way: Signal(0) on Unix is |
| 131 | // unsupported on Windows, so processAlive queries the OS directly there. |
| 132 | return processAlive(pid) |
| 133 | } |
| 134 | |
| 135 | // Stop sends SIGTERM to the daemon process |
| 136 | func Stop(root string) error { |