(ready chan<- *os.File)
| 95 | } |
| 96 | |
| 97 | func (c *child) waitReady(ready chan<- *os.File) { |
| 98 | var b [1]byte |
| 99 | if n, _ := c.readyR.Read(b[:]); n > 0 && b[0] == notifyReady { |
| 100 | // We know that writeNames has exited by this point. |
| 101 | // Closing the FD now signals to the child that the parent |
| 102 | // has exited. |
| 103 | ready <- c.namesW |
| 104 | } |
| 105 | c.readyR.Close() |
| 106 | } |
| 107 | |
| 108 | func (c *child) writeNames(names [][]string) { |
| 109 | enc := gob.NewEncoder(c.namesW) |