...
Source file
src/os/wait_waitid.go
Documentation: os
1
2
3
4
5
6
7
8
9
10 package os
11
12 import (
13 "internal/syscall/unix"
14 "runtime"
15 "syscall"
16 )
17
18
19
20
21 func (p *Process) blockUntilWaitable() (bool, error) {
22 var info unix.SiginfoChild
23 err := ignoringEINTR(func() error {
24 return unix.Waitid(unix.P_PID, p.Pid, &info, syscall.WEXITED|syscall.WNOWAIT, nil)
25 })
26 runtime.KeepAlive(p)
27 if err != nil {
28
29
30
31 if err == syscall.ENOSYS {
32 return false, nil
33 }
34 return false, NewSyscallError("waitid", err)
35 }
36 return true, nil
37 }
38
View as plain text