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 err := ignoringEINTR(func() error {
19 _, errno := wait6(_P_PID, p.Pid, syscall.WEXITED|syscall.WNOWAIT)
20 if errno != 0 {
21 return errno
22 }
23 return nil
24 })
25 runtime.KeepAlive(p)
26 if err == syscall.ENOSYS {
27 return false, nil
28 } else if err != nil {
29 return false, NewSyscallError("wait6", err)
30 }
31 return true, nil
32 }
33
View as plain text