1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-12-25 15:45:23 +00:00

Ignore if pty process has exited

This commit is contained in:
Aldo Adirajasa Fathoni 2023-09-26 13:23:20 +07:00
parent 3ef0fe19f8
commit 84e22e4a8c
No known key found for this signature in database
GPG key ID: 18BBC620752C83B0

View file

@ -200,8 +200,13 @@ def disconnect(sid):
global child_pid
# kill pty process
try:
os.kill(child_pid, signal.SIGKILL)
os.wait()
except ProcessLookupError:
pass
except ChildProcessError:
pass
# reset the variables
fd = None