portage.util._pty module¶
- portage.util._pty._create_pty_or_pipe(copy_term_size=None)¶
Try to create a pty and if then fails then create a normal pipe instead.
- Parameters
copy_term_size (int) – If a tty file descriptor is given then the term size will be copied to the pty.
- Return type
tuple
- Returns
A tuple of (is_pty, master_fd, slave_fd) where is_pty is True if a pty was successfully allocated, and False if a normal pipe was allocated.