ID EN
OS

forkpty

Python 3.11

Fork a child process, using a new pseudo-terminal as the child’s controlling terminal. Return a pair of (pid, fd), where pid is 0 in the child, the new child’s process id in the parent, and fd is the file descriptor of the master end of the pseudo-terminal. For a more portable approach, use the pty module. If an error occurs OSError is raised.

Syntax

PYTHON
os.forkpty()

See Also

pty OSError auditing event urllib.request RuntimeError Availability