-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathCHANGES
More file actions
56 lines (53 loc) · 1.48 KB
/
CHANGES
File metadata and controls
56 lines (53 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
v1 -> v2
Lib/tty.py -> ./tty.py:
+ mode_echo()
+ mode_raw()
+ getwinsz()
+ login()
setraw():
+ return original termios to avoid multiple tcgetattr calls
setcbreak():
+ return original termios to avoid multiple tcgetattr calls
Lib/pty.py -> ./pty2.py:
- master_open()
- slave_open()
openpty():
+ set slave termios
+ set slave winsize
fork():
+ set slave termios
+ set slave winsize
- some parts of fallback code
+ use tty.login() in fallback code as replacement
+ _getmask()
+ _sigblock()
+ _sigreset()
+ _pty_setup()
+ _winchset()
_copy():
+ except OSError in master_read()
+ set timeout for select() if master_read() returns b"" [ for
*BSD ] or if there is OSError in master_read() [ for Linux ]
spawn():
+ set slave termios
+ set slave winsize
+ register SIGWINCH handler
- use pty.fork()
+ use pty2.openpty()
+ use os.fork()
+ use tty.login()
+ block signals except during select.select() in _copy() and
during os.waitpid(); even the SIGWINCH handler blocks signals
to avoid os.close() failing on a slave descriptor; if any
descriptor of the slave remains open after child has exited,
_copy() will hang on Linux
- except OSError
Lib/test/test_pty.py -> ./test_pty.py
+ expectedFailureIfStdinIsTTY()
+ expectedFailureOnBSD()
PtyTest.test_basic() -> PtyTest.test_openpty():
+ test slave termios setting
+ test slave winsize setting
+ PtyTest.test_master_read()
SmallPtyTests._mock_select():
+ timeout argument which is ignored