diff options
author | Kevin Krakauer <krakauer@google.com> | 2021-02-11 11:06:56 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-02-11 11:09:22 -0800 |
commit | ae8d966f5af0bba9978a1aedac64038ef65a4cc9 (patch) | |
tree | c6540f92ac18e178dcd0189302ee94e13c12b3d6 /test/util/pty_util.h | |
parent | 192780946fdf584c5e504b24f47dbd9bd411a3a6 (diff) |
Assign controlling terminal when tty is opened and support NOCTTY
PiperOrigin-RevId: 357015186
Diffstat (limited to 'test/util/pty_util.h')
-rw-r--r-- | test/util/pty_util.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/util/pty_util.h b/test/util/pty_util.h index ed7658868..0cca2182c 100644 --- a/test/util/pty_util.h +++ b/test/util/pty_util.h @@ -21,9 +21,15 @@ namespace gvisor { namespace testing { -// Opens the replica end of the passed master as R/W and nonblocking. +// Opens the replica end of the passed master as R/W and nonblocking. It does +// not set the replica as the controlling TTY. PosixErrorOr<FileDescriptor> OpenReplica(const FileDescriptor& master); +// Identical to the above OpenReplica, but flags are all specified by the +// caller. +PosixErrorOr<FileDescriptor> OpenReplica(const FileDescriptor& master, + int flags); + // Get the number of the replica end of the master. PosixErrorOr<int> ReplicaID(const FileDescriptor& master); |