diff options
author | Justine Olshan <justineolshan@google.com> | 2018-06-19 15:22:23 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-06-19 15:23:36 -0700 |
commit | a6dbef045ff684e92f472280eb6f7f688b9bc87a (patch) | |
tree | 35aad9e3d975e0c217f12adec007d9a35521fc3d /pkg/sentry | |
parent | bda2a1ed3503699b8cb814bb3cc7ad0b9694155b (diff) |
Added a resume command to unpause a paused container.
Resume checks the status of the container and unpauses the kernel
if its status is paused. Otherwise nothing happens.
Tests were added to ensure that the process is in the correct state
after various commands.
PiperOrigin-RevId: 201251234
Change-Id: Ifd11b336c33b654fea6238738f864fcf2bf81e19
Diffstat (limited to 'pkg/sentry')
-rw-r--r-- | pkg/sentry/control/proc.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pkg/sentry/control/proc.go b/pkg/sentry/control/proc.go index d77b30c90..d94ae560f 100644 --- a/pkg/sentry/control/proc.go +++ b/pkg/sentry/control/proc.go @@ -18,6 +18,7 @@ import ( "bytes" "encoding/json" "fmt" + "sort" "syscall" "text/tabwriter" "time" @@ -245,6 +246,7 @@ func Processes(k *kernel.Kernel, out *[]*Process) error { Cmd: tg.Leader().Name(), }) } + sort.Slice(*out, func(i, j int) bool { return (*out)[i].PID < (*out)[j].PID }) return nil } |