()
| 52 | } |
| 53 | |
| 54 | func (fd *FD) String() string { |
| 55 | n := atomic.LoadUint32(&fd.fd) |
| 56 | if n == ^uint32(0) { |
| 57 | return fmt.Sprintf("subfd_%d[closed]", fd.origFD) |
| 58 | } |
| 59 | return fmt.Sprintf("subfd_%d", n) |
| 60 | } |
| 61 | |
| 62 | // IncRef increments the ref counter. If fd was closed, it's a no-op and returns false. |
| 63 | func (fd *FD) IncRef() bool { |
no outgoing calls
no test coverage detected