bpo-26228: [doc] Adapt PTY documentation updates from GH-4167 (GH-27754) · python/cpython@d412848 (original) (raw)

3 files changed

lines changed

Original file line number Diff line number Diff line change
@@ -2,8 +2,8 @@
2 2 ========================================
3 3
4 4 .. module:: pty
5 -:platform: Linux
6 -:synopsis: Pseudo-Terminal Handling for Linux.
5 +:platform: Unix
6 +:synopsis: Pseudo-Terminal Handling for Unix.
7 7
8 8 .. moduleauthor:: Steen Lumholt
9 9 .. sectionauthor:: Moshe Zadka moshez@zadka.site.co.il
@@ -16,9 +16,9 @@ The :mod:`pty` module defines operations for handling the pseudo-terminal
16 16 concept: starting another process and being able to write to and read from its
17 17 controlling terminal programmatically.
18 18
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).
22 22
23 23 The :mod:`pty` module defines the following functions:
24 24
@@ -47,6 +47,10 @@ The :mod:`pty` module defines the following functions:
47 47 spawned behind the pty will eventually terminate, and when it does *spawn*
48 48 will return.
49 49
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 +
50 54 The functions *master_read* and *stdin_read* are passed a file descriptor
51 55 which they should read from, and they should always return a byte string. In
52 56 order to force spawn to return before the child process exits an
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
1 1 """Pseudo terminal utilities."""
2 2
3 3 # 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.
5 5 # See: W. Richard Stevens. 1992. Advanced Programming in the
6 6 # UNIX Environment. Chapter 19.
7 7 # Author: Steen Lumholt -- with additions by Guido.
Original file line number Diff line number Diff 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.