summaryrefslogtreecommitdiffhomepage
path: root/pkg
diff options
context:
space:
mode:
authorNicolas Lacasse <nlacasse@google.com>2018-10-10 10:41:18 -0700
committerShentubot <shentubot@google.com>2018-10-10 10:42:11 -0700
commitb78552d30e0af4122710e01bc86cbde6bb412686 (patch)
tree2e30fcb2f7e2593ef9e50523c67705cc4f7486c9 /pkg
parent29cd05a7c66ee8061c0e5cf8e94c4e507dcf33e0 (diff)
When creating a new process group, add it to the session.
PiperOrigin-RevId: 216554791 Change-Id: Ia6b7a2e6eaad80a81b2a8f2e3241e93ebc2bda35
Diffstat (limited to 'pkg')
-rw-r--r--pkg/sentry/kernel/sessions.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/sentry/kernel/sessions.go b/pkg/sentry/kernel/sessions.go
index b44d218d9..a9b4e7647 100644
--- a/pkg/sentry/kernel/sessions.go
+++ b/pkg/sentry/kernel/sessions.go
@@ -367,6 +367,9 @@ func (tg *ThreadGroup) CreateProcessGroup() error {
tg.processGroup.decRefWithParent(oldParentPG)
tg.processGroup = pg
+ // Add the new process group to the session.
+ pg.session.processGroups.PushBack(pg)
+
// Ensure this translation is added to all namespaces.
for ns := tg.pidns; ns != nil; ns = ns.parent {
local := ns.tids[tg.leader]