MCPcopy
hub / github.com/opencontainers/runc / parseSync

Function parseSync

libcontainer/sync.go:189–203  ·  view source on GitHub ↗

parseSync runs the given callback function on each syncT received from the child. It will return once io.EOF is returned from the given pipe.

(pipe *syncSocket, fn func(*syncT) error)

Source from the content-addressed store, hash-verified

187// parseSync runs the given callback function on each syncT received from the
188// child. It will return once io.EOF is returned from the given pipe.
189func parseSync(pipe *syncSocket, fn func(*syncT) error) error {
190 for {
191 sync, err := doReadSync(pipe)
192 if err != nil {
193 if errors.Is(err, io.EOF) {
194 break
195 }
196 return err
197 }
198 if err := fn(&sync); err != nil {
199 return err
200 }
201 }
202 return nil
203}

Callers 2

startMethod · 0.85
startMethod · 0.85

Calls 1

doReadSyncFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…