summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/kernel/sessions.go
diff options
context:
space:
mode:
authorBhasker Hariharan <bhaskerh@google.com>2019-08-30 18:09:37 -0700
committergVisor bot <gvisor-bot@google.com>2019-08-30 18:15:32 -0700
commit54bf2e8eff4a5e619e7e3abafcda6ffc52d937f2 (patch)
tree32787cfc37089d42f8c5b64e8996419170aad30a /pkg/sentry/kernel/sessions.go
parentf3dabdfc486874edc986ff63abe74ec1c85e18e1 (diff)
Automated rollback of changelist 261387276
PiperOrigin-RevId: 266491264
Diffstat (limited to 'pkg/sentry/kernel/sessions.go')
-rw-r--r--pkg/sentry/kernel/sessions.go12
1 files changed, 1 insertions, 11 deletions
diff --git a/pkg/sentry/kernel/sessions.go b/pkg/sentry/kernel/sessions.go
index e5f297478..81fcd8258 100644
--- a/pkg/sentry/kernel/sessions.go
+++ b/pkg/sentry/kernel/sessions.go
@@ -47,11 +47,6 @@ type Session struct {
// The id is immutable.
id SessionID
- // foreground is the foreground process group.
- //
- // This is protected by TaskSet.mu.
- foreground *ProcessGroup
-
// ProcessGroups is a list of process groups in this Session. This is
// protected by TaskSet.mu.
processGroups processGroupList
@@ -265,14 +260,12 @@ func (pg *ProcessGroup) SendSignal(info *arch.SignalInfo) error {
func (tg *ThreadGroup) CreateSession() error {
tg.pidns.owner.mu.Lock()
defer tg.pidns.owner.mu.Unlock()
- tg.signalHandlers.mu.Lock()
- defer tg.signalHandlers.mu.Unlock()
return tg.createSession()
}
// createSession creates a new session for a threadgroup.
//
-// Precondition: callers must hold TaskSet.mu and the signal mutex for writing.
+// Precondition: callers must hold TaskSet.mu for writing.
func (tg *ThreadGroup) createSession() error {
// Get the ID for this thread in the current namespace.
id := tg.pidns.tgids[tg]
@@ -353,9 +346,6 @@ func (tg *ThreadGroup) createSession() error {
ns.processGroups[ProcessGroupID(local)] = pg
}
- // Disconnect from the controlling terminal.
- tg.tty = nil
-
return nil
}