cpython: c87cc05af8e7 (original) (raw)
Mercurial > cpython
changeset 99920:c87cc05af8e7 3.5
Issue #14771: Redirect GDB's stdin to avoid messing the terminal settings Otherwise, GDB seems to affect the terminal's foreground process group, interfering with test_ioctl, which does not expect the foreground process to change during the test. This change also solves the problem of the tests being stopped in the shell if test_gdb is run twice in parallel. [#14771]
Martin Panter vadmium+py@gmail.com | |
---|---|
date | Sat, 16 Jan 2016 05🔞47 +0000 |
parents | 4b4dbc90c6a0 |
children | 620a37dbc686 e40f6c3dc114 |
files | Lib/test/test_gdb.py |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-)[+] [-] Lib/test/test_gdb.py 3 |
line wrap: on
line diff
--- a/Lib/test/test_gdb.py +++ b/Lib/test/test_gdb.py @@ -75,6 +75,9 @@ def run_gdb(*args, **env_vars): if (gdb_major_version, gdb_minor_version) >= (7, 4): base_cmd += ('-iex', 'add-auto-load-safe-path ' + checkout_hook_path) proc = subprocess.Popen(base_cmd + args,
# Redirect stdin to prevent GDB from messing with[](#l1.7)
# the terminal settings[](#l1.8)
stdin=subprocess.PIPE,[](#l1.9) stdout=subprocess.PIPE,[](#l1.10) stderr=subprocess.PIPE,[](#l1.11) env=env)[](#l1.12)