Skip to content
This repository was archived by the owner on Nov 14, 2021. It is now read-only.

Commit 134c5f7

Browse files
committed
add processRGROUP & processPPID functions
1 parent b8882d7 commit 134c5f7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

ps.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -768,3 +768,12 @@ func processRSS(p *process.Process, ctx *psContext) (string, error) {
768768
func processState(p *process.Process, ctx *psContext) (string, error) {
769769
return p.Status.State, nil
770770
}
771+
772+
func processRGROUP(p *process.Process, ctx *psContext) (string, error) {
773+
return process.LookupGID(p.Status.Gids[0])
774+
}
775+
776+
// processPPID returns the parent process ID of process p.
777+
func processPPID(p *process.Process, ctx *psContext) (string, error) {
778+
return p.Status.PPid, nil
779+
}

0 commit comments

Comments
 (0)