8 // Weird name but matches the MSDN docs
9 exit_STILL_ACTIVE = 259
11 processDesiredAccess = syscall.STANDARD_RIGHTS_READ |
12 syscall.PROCESS_QUERY_INFORMATION |
16 // _pidAlive tests whether a process is alive or not
17 func _pidAlive(pid int) bool {
18 h, err := syscall.OpenProcess(processDesiredAccess, false, uint32(pid))
24 if e := syscall.GetExitCodeProcess(h, &ec); e != nil {
28 return ec == exit_STILL_ACTIVE