MCPcopy
hub / github.com/cloudflare/tableflip / waitReady

Method waitReady

child.go:97–106  ·  view source on GitHub ↗
(ready chan<- *os.File)

Source from the content-addressed store, hash-verified

95}
96
97func (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
108func (c *child) writeNames(names [][]string) {
109 enc := gob.NewEncoder(c.namesW)

Callers 1

startChildFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected