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

Method Run

libcontainer/container_linux.go:214–224  ·  view source on GitHub ↗

Run immediately starts the process inside the container. Returns an error if the process fails to start. It does not block waiting for the exec fifo after start returns but opens the fifo after start returns.

(process *Process)

Source from the content-addressed store, hash-verified

212// the process fails to start. It does not block waiting for the exec fifo
213// after start returns but opens the fifo after start returns.
214func (c *Container) Run(process *Process) error {
215 c.m.Lock()
216 defer c.m.Unlock()
217 if err := c.start(process); err != nil {
218 return err
219 }
220 if process.Init {
221 return c.exec()
222 }
223 return nil
224}
225
226// Exec signals the container to exec the users process at the end of the init.
227func (c *Container) Exec() error {

Callers

nothing calls this directly

Calls 2

startMethod · 0.95
execMethod · 0.95

Tested by

no test coverage detected