proper ordering during shutdown

This commit is contained in:
Kovid Goyal 2022-02-24 00:27:09 +05:30
parent fa397a1d24
commit 0a297f4656
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -188,8 +188,9 @@ class PTY:
def __del__(self):
if not self.is_child:
self.queue.put(None)
os.close(self.master_fd)
fd = self.master_fd
del self.master_fd
os.close(fd)
def write_loop(self):
while True: