(targetFD int)
| 182 | } |
| 183 | |
| 184 | func (p *Process) getFD(targetFD int) (*fd.FD, syscall.Errno) { |
| 185 | if !p.pidfd.IncRef() { |
| 186 | return nil, unix.EBADF |
| 187 | } |
| 188 | defer p.pidfd.DecRef() |
| 189 | |
| 190 | ret, _, errno := unix.Syscall(unix.SYS_PIDFD_GETFD, uintptr(p.pidfd.FD()), uintptr(targetFD), 0) |
| 191 | if errno != 0 { |
| 192 | return nil, errno |
| 193 | } |
| 194 | return fd.NewFD(int(ret)), 0 |
| 195 | } |
| 196 | |
| 197 | func (p *Process) poll() (exited bool, _ error) { |
| 198 | if !p.pidfd.IncRef() { |
no test coverage detected