Source file
src/os/wait_wait6.go
1
2
3
4
5
6
7 package os
8
9 import (
10 "runtime"
11 "syscall"
12 )
13
14
15
16
17 func (p *Process) blockUntilWaitable() (bool, error) {
18 var errno syscall.Errno
19 for {
20 _, errno = wait6(_P_PID, p.Pid, syscall.WEXITED|syscall.WNOWAIT)
21 if errno != syscall.EINTR {
22 break
23 }
24 }
25 runtime.KeepAlive(p)
26 if errno == syscall.ENOSYS {
27 return false, nil
28 } else if errno != 0 {
29 return false, NewSyscallError("wait6", errno)
30 }
31 return true, nil
32 }
33
View as plain text