Close tty_fd in master on fork() rather than on close()

This commit is contained in:
Kovid Goyal
2022-07-08 15:39:23 +05:30
parent 8998970adc
commit 6a101c51d2

View File

@@ -463,6 +463,9 @@ class SocketChild:
if self.pid > 0:
# master process
os.close(w)
if self.tty_fd > -1:
os.close(self.tty_fd)
self.tty_fd = -1
if self.stdin > -1:
os.close(self.stdin)
self.stdin = -1