diff options
Diffstat (limited to 'pkg/sentry/control/proc.go')
-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 } |