summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2006-11-09 11:06:03 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2006-11-09 11:06:03 (GMT)
commitb2bba739c556a94837db4621d370401330d6be0c (patch)
tree834cdccba6b6ab89b7d73049b1a6b77d2e746662
parent394ae90db3e4dc996e86730099d2df3e0e028495 (diff)
downloadcpython-b2bba739c556a94837db4621d370401330d6be0c.zip
cpython-b2bba739c556a94837db4621d370401330d6be0c.tar.gz
cpython-b2bba739c556a94837db4621d370401330d6be0c.tar.bz2
Patch #838546: Make terminal become controlling in pty.fork().
Will backport to 2.5.
-rw-r--r--Lib/pty.py4
-rw-r--r--Misc/NEWS2
2 files changed, 6 insertions, 0 deletions
diff --git a/Lib/pty.py b/Lib/pty.py
index fae162d..889113c 100644
--- a/Lib/pty.py
+++ b/Lib/pty.py
@@ -118,6 +118,10 @@ def fork():
if (slave_fd > STDERR_FILENO):
os.close (slave_fd)
+ # Explicitly open the tty to make it become a controlling tty.
+ tmp_fd = os.open(os.ttyname(STDOUT_FILENO), os.O_RDWR)
+ os.close(tmp_fd)
+
# Parent and child process.
return pid, master_fd
diff --git a/Misc/NEWS b/Misc/NEWS
index 3409c8d..9f6d782 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -96,6 +96,8 @@ Core and builtins
Library
-------
+- Patch #838546: Make terminal become controlling in pty.fork()
+
- Patch #1351744: Add askyesnocancel helper for tkMessageBox.
- Patch #1060577: Extract list of RPM files from spec file in