diff options
author | gVisor bot <gvisor-bot@google.com> | 2019-09-19 18:40:33 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-09-19 18:40:33 +0000 |
commit | ca666e6907ceeb901fc4d5ce1a64653c7332dfa6 (patch) | |
tree | ad0699fe5710fc88ded79e97c87de4a4687ceab0 /pkg/sentry/fs/tty/slave.go | |
parent | 942348675805ffff352ad74371815541f57cd6cb (diff) | |
parent | 0a8a75f3dabaf5c097710c3bb961b67b8ed653b5 (diff) |
Merge release-20190806.1-159-g0a8a75f (automated)
Diffstat (limited to 'pkg/sentry/fs/tty/slave.go')
-rw-r--r-- | pkg/sentry/fs/tty/slave.go | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/pkg/sentry/fs/tty/slave.go b/pkg/sentry/fs/tty/slave.go index e30266404..944c4ada1 100644 --- a/pkg/sentry/fs/tty/slave.go +++ b/pkg/sentry/fs/tty/slave.go @@ -152,9 +152,16 @@ func (sf *slaveFileOperations) Ioctl(ctx context.Context, _ *fs.File, io usermem case linux.TIOCSCTTY: // Make the given terminal the controlling terminal of the // calling process. - // TODO(b/129283598): Implement once we have support for job - // control. - return 0, nil + return 0, sf.si.t.setControllingTTY(ctx, io, args, false /* isMaster */) + case linux.TIOCNOTTY: + // Release this process's controlling terminal. + return 0, sf.si.t.releaseControllingTTY(ctx, io, args, false /* isMaster */) + case linux.TIOCGPGRP: + // Get the foreground process group. + return sf.si.t.foregroundProcessGroup(ctx, io, args, false /* isMaster */) + case linux.TIOCSPGRP: + // Set the foreground process group. + return sf.si.t.setForegroundProcessGroup(ctx, io, args, false /* isMaster */) default: maybeEmitUnimplementedEvent(ctx, cmd) return 0, syserror.ENOTTY |