diff options
Diffstat (limited to 'runsc/container/container.go')
-rw-r--r-- | runsc/container/container.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/runsc/container/container.go b/runsc/container/container.go index f20ec2453..eee148f5a 100644 --- a/runsc/container/container.go +++ b/runsc/container/container.go @@ -299,6 +299,16 @@ func (c *Container) Signal(sig syscall.Signal) error { return c.Sandbox.Signal(c.ID, sig) } +// Checkpoint sends the checkpoint call to the container. +func (c *Container) Checkpoint() error { + log.Debugf("Checkpoint container %q", c.ID) + if c.Status == Stopped { + log.Warningf("container %q not running, not checkpointing", c.ID) + return nil + } + return c.Sandbox.Checkpoint(c.ID) +} + // State returns the metadata of the container. func (c *Container) State() specs.State { return specs.State{ |