返回 DeepSeek-Reasonix
process_unix.go
根目录 / internal / repair / process_unix.go
1 //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
2
3 package repair
4
5 import "syscall"
6
7 func startupProcessAlive(pid int) bool {
8 if pid <= 0 {
9 return false
10 }
11 err := syscall.Kill(pid, 0)
12 return err == nil || err == syscall.EPERM
13 }
14
14 lines GO