Merge pull request #1561 from zhangningdlut:chris_tty

PiperOrigin-RevId: 291821850
This commit is contained in:
gVisor bot
2020-01-27 16:35:38 -08:00
+2
View File
@@ -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