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

Method Destroy

libcontainer/container_linux.go:750–757  ·  view source on GitHub ↗

Destroy destroys the container, if its in a valid state. Any event registrations are removed before the container is destroyed. No error is returned if the container is already destroyed. Running containers must first be stopped using Signal. Paused containers must first be resumed using Resume.

()

Source from the content-addressed store, hash-verified

748// Running containers must first be stopped using Signal.
749// Paused containers must first be resumed using Resume.
750func (c *Container) Destroy() error {
751 c.m.Lock()
752 defer c.m.Unlock()
753 if err := c.state.destroy(); err != nil {
754 return fmt.Errorf("unable to destroy container: %w", err)
755 }
756 return nil
757}
758
759// Pause pauses the container, if its state is RUNNING or CREATED, changing
760// its state to PAUSED. If the state is already PAUSED, does nothing.

Callers 8

destroyMethod · 0.45
killContainerFunction · 0.45
delete.goFile · 0.45
checkpoint.goFile · 0.45
Example_containerFunction · 0.45
startMethod · 0.45
destroyFunction · 0.45
unitCommandFunction · 0.45

Calls 1

destroyMethod · 0.65

Tested by 1

Example_containerFunction · 0.36