ListPids returns process ID and other info

Signed-off-by: Jess <jessica.valarezo@docker.com>
This commit is contained in:
Jess
2017-10-10 22:57:15 +00:00
parent 72bb45ac46
commit 061c719209
18 changed files with 1118 additions and 405 deletions

View File

@@ -42,7 +42,7 @@ type Task interface {
// Exec adds a process into the container
Exec(context.Context, string, ExecOpts) (Process, error)
// Pids returns all pids
Pids(context.Context) ([]uint32, error)
Pids(context.Context) ([]ProcessInfo, error)
// Checkpoint checkpoints a container to an image with live system data
Checkpoint(context.Context, string, *types.Any) error
// DeleteProcess deletes a specific exec process via its id
@@ -92,3 +92,11 @@ type State struct {
Stderr string
Terminal bool
}
type ProcessInfo struct {
// Pid is the process ID
Pid uint32
// Info includes additional process information
// Info varies by platform
Info interface{}
}