On this page
posix.forkpty
Prev: posix.fork | Up: posix | Next: posix.fpathconf
Rel: posix.abort, posix.access, posix.chdir, posix.chflags
Ref: docs.python.org — posix.forkpty
Tags: #public #python3 #stdlib #posix
Import
import posix
from posix import forkpty
Signature & Overview
posix.forkpty()
Fork a new process with a new pseudo-terminal as controlling tty.
Usage
import os
# Forks a child attached to a new pseudo-terminal
assert hasattr(os, 'forkpty') or True
Gotchas
- Unix-only: Prefer
pty.openpty()+subprocess.Popen.
REPL Inspect
from posix import forkpty
help(forkpty)
Linked from
Related notes
- tuts/python3/stdlib_module/posix/fork Linked here; links to this page; shared tags: #posix, #stdlib
- tuts/python3/stdlib_module/posix/fpathconf Linked here; links to this page; shared tags: #posix, #stdlib
- tuts/python3/stdlib_module/posix Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/posix/abort Linked here; shared tags: #posix, #stdlib
- tuts/python3/stdlib_module/posix/access Linked here; shared tags: #posix, #stdlib
- tuts/python3/stdlib_module/posix/chdir Linked here; shared tags: #posix, #stdlib
- tuts/python3/stdlib_module/posix/chflags Linked here; shared tags: #posix, #stdlib
- tuts/python3/stdlib_module/posix/chmod shared tags: #posix, #stdlib
- tuts/python3/stdlib_module/posix/chown shared tags: #posix, #stdlib
- tuts/python3/stdlib_module/posix/chroot shared tags: #posix, #stdlib