Skip to content

Commit

Permalink
cmd/debug: fix 'ps' compatibility on mac (#5022)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhijian-pro authored Jul 26, 2024
1 parent 757e1b4 commit 7c71927
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func getCmdMount(mp string) (uid, pid, cmd string, err error) {
var psArgs []string
if tmpPid != "" {
pid = tmpPid
psArgs = []string{"/bin/sh", "-c", fmt.Sprintf("ps -f --pid %s", pid)}
psArgs = []string{"/bin/sh", "-c", fmt.Sprintf("ps -f -p %s", pid)}
} else {
psArgs = []string{"/bin/sh", "-c", fmt.Sprintf("ps -ef | grep -v grep | grep mount | grep %s", mp)}
}
Expand Down

0 comments on commit 7c71927

Please sign in to comment.