From c290faebc21bcb4a44b641ce2e267d44de194aa1 Mon Sep 17 00:00:00 2001 From: Zhang Wei Date: Mon, 26 Jun 2017 16:16:39 +0800 Subject: [PATCH] Show nslistener pid for `ps` command We need to display nslistener pid for `ps` command to make `docker top` work with runv container Signed-off-by: Zhang Wei --- ps.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ps.go b/ps.go index 21ff16ed..01f1436f 100644 --- a/ps.go +++ b/ps.go @@ -46,9 +46,9 @@ var psCommand = cli.Command{ fatal(err) } case "json": - pids := make([]string, 0) + pids := make([]int, 0) for _, p := range c.Processes { - pids = append(pids, p.Pid) + pids = append(pids, int(p.SystemPid)) } data, err := json.Marshal(pids)