summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/kernel/task_start.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/sentry/kernel/task_start.go')
-rw-r--r--pkg/sentry/kernel/task_start.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/sentry/kernel/task_start.go b/pkg/sentry/kernel/task_start.go
index d60cd62c7..ae6fc4025 100644
--- a/pkg/sentry/kernel/task_start.go
+++ b/pkg/sentry/kernel/task_start.go
@@ -172,9 +172,10 @@ func (ts *TaskSet) newTask(cfg *TaskConfig) (*Task, error) {
if parentPG := tg.parentPG(); parentPG == nil {
tg.createSession()
} else {
- // Inherit the process group.
+ // Inherit the process group and terminal.
parentPG.incRefWithParent(parentPG)
tg.processGroup = parentPG
+ tg.tty = t.parent.tg.tty
}
}
tg.tasks.PushBack(t)