diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-01-27 16:35:38 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-01-27 16:35:38 -0800 |
commit | db68c85ab707b992c27d66b095165a33a621dc2d (patch) | |
tree | a32dbfb823fd0263dc4a72259d17c4c387a4b05c /pkg/sentry | |
parent | 253c9e666cf7d52352da97d764818e510f1387c0 (diff) | |
parent | 376a777c55680f8139313d87bd460248fd251941 (diff) |
Merge pull request #1561 from zhangningdlut:chris_tty
PiperOrigin-RevId: 291821850
Diffstat (limited to 'pkg/sentry')
-rw-r--r-- | pkg/sentry/kernel/tty.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pkg/sentry/kernel/tty.go b/pkg/sentry/kernel/tty.go index 464d2306a..d0e0810e8 100644 --- a/pkg/sentry/kernel/tty.go +++ b/pkg/sentry/kernel/tty.go @@ -33,6 +33,8 @@ type TTY struct { // TTY returns the thread group's controlling terminal. If nil, there is no // controlling terminal. func (tg *ThreadGroup) TTY() *TTY { + tg.pidns.owner.mu.RLock() + defer tg.pidns.owner.mu.RUnlock() tg.signalHandlers.mu.Lock() defer tg.signalHandlers.mu.Unlock() return tg.tty |