Patch #838546: Make terminal become controlling in pty.fork().
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 @@
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 5c575c9..6753554 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -70,6 +70,8 @@
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.