summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/control/proc.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/sentry/control/proc.go')
-rw-r--r--pkg/sentry/control/proc.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/sentry/control/proc.go b/pkg/sentry/control/proc.go
index 106055e86..faf1168bb 100644
--- a/pkg/sentry/control/proc.go
+++ b/pkg/sentry/control/proc.go
@@ -278,8 +278,8 @@ func Processes(k *kernel.Kernel, containerID string, out *[]*Process) error {
}
ppid := kernel.ThreadID(0)
- if tg.Leader().Parent() != nil {
- ppid = ts.Root.IDOfThreadGroup(tg.Leader().Parent().ThreadGroup())
+ if p := tg.Leader().Parent(); p != nil {
+ ppid = ts.Root.IDOfThreadGroup(p.ThreadGroup())
}
*out = append(*out, &Process{
UID: tg.Leader().Credentials().EffectiveKUID,