mirror of
https://github.com/python/cpython.git
synced 2025-07-29 14:15:07 +00:00
Patch #838546: Make terminal become controlling in pty.fork().
Will backport to 2.5.
This commit is contained in:
parent
394ae90db3
commit
b2bba739c5
2 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue