MCPcopy Create free account
hub / github.com/PasarGuard/node / isProcessRunning

Function isProcessRunning

backend/xray/process_windows.go:174–183  ·  view source on GitHub ↗

isProcessRunning checks if a process is still running

(pid int)

Source from the content-addressed store, hash-verified

172
173// isProcessRunning checks if a process is still running
174func isProcessRunning(pid int) bool {
175 proc, err := os.FindProcess(pid)
176 if err != nil {
177 return false
178 }
179
180 // Try to signal the process - if it fails, it's likely dead
181 err = proc.Signal(syscall.Signal(0))
182 return err == nil
183}
184
185// isProcessZombie checks if a process is a zombie on Windows
186// On Windows, we check if the process exists but parent doesn't exist or is invalid

Callers 3

killProcessTreeFunction · 0.70
verifyProcessDeadFunction · 0.70
isProcessZombieFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected