Skip to content

Commit d412848

Browse files
miss-islingtonambv
andauthored
bpo-26228: [doc] Adapt PTY documentation updates from GH-4167 (GH-27754)
Co-authored-by: Cornelius Diekmann <c.diekmann@googlemail.com> (cherry picked from commit dd8eb30) Co-authored-by: Łukasz Langa <lukasz@langa.pl>
1 parent 6d13486 commit d412848

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

‎Doc/library/pty.rst

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
========================================
33

44
.. module:: pty
5-
:platform: Linux
6-
:synopsis: Pseudo-Terminal Handling for Linux.
5+
:platform: Unix
6+
:synopsis: Pseudo-Terminal Handling for Unix.
77

88
.. moduleauthor:: Steen Lumholt
99
.. sectionauthor:: Moshe Zadka <moshez@zadka.site.co.il>
@@ -16,9 +16,9 @@ The :mod:`pty` module defines operations for handling the pseudo-terminal
1616
concept: starting another process and being able to write to and read from its
1717
controlling terminal programmatically.
1818

19-
Because pseudo-terminal handling is highly platform dependent, there is code to
20-
do it only for Linux. (The Linux code is supposed to work on other platforms,
21-
but hasn't been tested yet.)
19+
Pseudo-terminal handling is highly platform dependent. This code is mainly
20+
tested on Linux, FreeBSD, and macOS (it is supposed to work on other POSIX
21+
platforms but it's not been thoroughly tested).
2222

2323
The :mod:`pty` module defines the following functions:
2424

@@ -47,6 +47,10 @@ The :mod:`pty` module defines the following functions:
4747
spawned behind the pty will eventually terminate, and when it does *spawn*
4848
will return.
4949

50+
A loop copies STDIN of the current process to the child and data received
51+
from the child to STDOUT of the current process. It is not signaled to the
52+
child if STDIN of the current process closes down.
53+
5054
The functions *master_read* and *stdin_read* are passed a file descriptor
5155
which they should read from, and they should always return a byte string. In
5256
order to force spawn to return before the child process exits an

‎Lib/pty.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Pseudo terminal utilities."""
22

33
# Bugs: No signal handling. Doesn't set slave termios and window size.
4-
# Only tested on Linux.
4+
# Only tested on Linux, FreeBSD, and macOS.
55
# See: W. Richard Stevens. 1992. Advanced Programming in the
66
# UNIX Environment. Chapter 19.
77
# Author: Steen Lumholt -- with additions by Guido.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
pty.spawn no longer hangs on FreeBSD, OS X, and Solaris.
1+
pty.spawn no longer hangs on FreeBSD, macOS, and Solaris.

0 commit comments

Comments
 (0)