From: Martin v. Löwis Date: Thu, 9 Nov 2006 11:06:03 +0000 (+0000) Subject: Patch #838546: Make terminal become controlling in pty.fork(). X-Git-Tag: v2.6a1~2448 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b2bba739c556a94837db4621d370401330d6be0c;p=python Patch #838546: Make terminal become controlling in pty.fork(). Will backport to 2.5. --- diff --git a/Lib/pty.py b/Lib/pty.py index fae162dc48..889113c3dd 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 3409c8dd71..9f6d782e24 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