isProcessRunning checks if a process is still running
(pid int)
| 249 | |
| 250 | // isProcessRunning checks if a process is still running |
| 251 | func isProcessRunning(pid int) bool { |
| 252 | proc, err := os.FindProcess(pid) |
| 253 | if err != nil { |
| 254 | return false |
| 255 | } |
| 256 | |
| 257 | // Try to signal the process - if it fails, it's likely dead |
| 258 | err = proc.Signal(syscall.Signal(0)) |
| 259 | return err == nil |
| 260 | } |
| 261 | |
| 262 | // isProcessZombie checks if a process is a zombie on Unix |
| 263 | // This is already handled in findXrayProcesses by checking the state field |
no outgoing calls
no test coverage detected