From: Martin v. Löwis Date: Thu, 9 Nov 2006 11:06:30 +0000 (+0000) Subject: Patch #838546: Make terminal become controlling in pty.fork(). X-Git-Tag: v2.5.1c1~262 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3f63454e2258f8b187764066fca2cc2a9361b628;p=thirdparty%2FPython%2Fcpython.git Patch #838546: Make terminal become controlling in pty.fork(). --- diff --git a/Lib/pty.py b/Lib/pty.py index fae162dc4875..889113c3dd57 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 5c575c974732..6753554ea3d6 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -70,6 +70,8 @@ Core and builtins Extension Modules ----------------- +- Patch #838546: Make terminal become controlling in pty.fork() + - Patch #1560695: Add .note.GNU-stack to ctypes' sysv.S so that ctypes isn't considered as requiring executable stacks.