From b82b27cc48779e220c64da7446cbb0235b231ac2 Mon Sep 17 00:00:00 2001 From: Doug Rabson Date: Wed, 5 Oct 2022 17:30:08 +0100 Subject: [PATCH] pkg/util: Add pid information descriptors for FreeBSD [NO NEW TESTS NEEDED] Signed-off-by: Doug Rabson --- pkg/util/utils_freebsd.go | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/pkg/util/utils_freebsd.go b/pkg/util/utils_freebsd.go index ba91308aff..621bb436ee 100644 --- a/pkg/util/utils_freebsd.go +++ b/pkg/util/utils_freebsd.go @@ -4,13 +4,29 @@ package util import ( - "errors" - "github.com/opencontainers/runtime-tools/generate" ) func GetContainerPidInformationDescriptors() ([]string, error) { - return []string{}, errors.New("this function is not supported on freebsd") + // These are chosen to match the set of AIX format descriptors + // supported in Linux - FreeBSD ps does support (many) others. + return []string{ + "args", + "comm", + "etime", + "group", + "nice", + "pcpu", + "pgid", + "pid", + "ppid", + "rgroup", + "ruser", + "time", + "tty", + "user", + "vsz", + }, nil } func AddPrivilegedDevices(g *generate.Generator, systemdMode bool) error {