containerd/linux/shim/process.go
Michael Crosby 63878d14ea Add create/start to exec processes in shim
This splits up the create and start of an exec process in the shim to
have two separate steps like the initial process.  This will allow
better state reporting for individual process along with a more robust
wait for execs.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-08-02 13:50:08 -04:00

44 lines
916 B
Go

// +build !windows
package shim
import (
"context"
"io"
"time"
"github.com/containerd/console"
)
type stdio struct {
stdin string
stdout string
stderr string
terminal bool
}
type process interface {
// ID returns the id for the process
ID() string
// Pid returns the pid for the process
Pid() int
// Resize resizes the process console
Resize(ws console.WinSize) error
// Exited sets the exit status for the process
Exited(status int)
// Status returns the exit status
Status() int
// ExitedAt is the time the process exited
ExitedAt() time.Time
// Delete deletes the process and its resourcess
Delete(context.Context) error
// Stdin returns the process STDIN
Stdin() io.Closer
// Kill kills the process
Kill(context.Context, uint32, bool) error
// Stdio returns io information for the container
Stdio() stdio
// Start execution of the process
Start(context.Context) error
}