Merge pull request #19312 from sg2342/freebsd-remote-top

libpod: fix FreeBSD 'podman-remote top' default behaviour
This commit is contained in:
Daniel J Walsh 2023-07-24 13:50:04 -04:00 • committed by GitHub
commit 5f90fbcdc1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -43,7 +43,7 @@ func (c *Container) Top(descriptors []string) ([]string, error) {
}
// Default to 'ps -ef' compatible descriptors
if len(descriptors) == 0 {
if len(strings.Join(descriptors, "")) == 0 {
descriptors = []string{"user", "pid", "ppid", "pcpu", "etime", "tty", "time", "args"}
}