MCPcopy Create free account
hub / github.com/JordanCoin/codemap / IsRunning

Function IsRunning

watch/state.go:125–133  ·  view source on GitHub ↗

IsRunning checks if the daemon is running

(root string)

Source from the content-addressed store, hash-verified

123
124// IsRunning checks if the daemon is running
125func 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
136func Stop(root string) error {

Callers 5

getHubInfoWithFallbackFunction · 0.92
shouldRestartDaemonFunction · 0.92
hookSessionStartFunction · 0.92
ReadStateFunction · 0.85

Calls 2

ReadPIDFunction · 0.85
processAliveFunction · 0.70

Tested by 1