From a0692cc17a86370bf204344470a8e961fcb9b4d0 Mon Sep 17 00:00:00 2001 From: Heretic Date: Tue, 2 Feb 2016 18:52:57 +0800 Subject: [PATCH] 1)fix callps command generate error --- process/process_darwin.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/process/process_darwin.go b/process/process_darwin.go index 434ed9a..9ad8ccf 100644 --- a/process/process_darwin.go +++ b/process/process_darwin.go @@ -415,9 +415,9 @@ func callPs(arg string, pid int32, threadOption bool) ([][]string, error) { if pid == 0 { // will get from all processes. cmd = []string{"-ax", "-o", arg} } else if threadOption { - cmd = []string{"-ax", "-o", arg, "-M", "-p", strconv.Itoa(int(pid))} + cmd = []string{"-x", "-o", arg, "-M", "-p", strconv.Itoa(int(pid))} } else { - cmd = []string{"-ax", "-o", arg, "-p", strconv.Itoa(int(pid))} + cmd = []string{"-x", "-o", arg, "-p", strconv.Itoa(int(pid))} } out, err := invoke.Command(bin, cmd...) if err != nil {