mirror of
https://github.com/containers/podman.git
synced 2025-11-29 17:48:05 +08:00
libpod: Fix "top" support on FreeBSD
FreeBSD's ps ignores -J if -a is specified, so "podman top" would effectively just run ps -a, not terribly useful. But there's no need to specify -a when specifying a selector such as -J (or -G or -U, etc.). Signed-off-by: Mark Johnston <mark.johnston@klarasystems.com>
This commit is contained in:
@@ -57,7 +57,7 @@ func (c *Container) Top(descriptors []string) ([]string, error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if supportedDescriptors {
|
if supportedDescriptors {
|
||||||
descriptors = []string{"-ao", strings.Join(descriptors, ",")}
|
descriptors = []string{"-o", strings.Join(descriptors, ",")}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Note that the descriptors to ps(1) must be shlexed (see #12452).
|
// Note that the descriptors to ps(1) must be shlexed (see #12452).
|
||||||
|
|||||||
Reference in New Issue
Block a user