Commit b1e27a7f authored by anonym's avatar anonym
Browse files

Catch unhandled signals while sigtimedwait()ing in the remote shell.

This exception is thrown if any other signal than SIGIO is received
while we are calling sigtimedwait(), which should result in the remote
shell crashing.
parent d02e0524
......@@ -80,7 +80,11 @@ def main():
# In case the SIGIO gets lost for whatever reason
# (e.g. the one mentioned above), let's always poll at
# least once every second.
signal.sigtimedwait([signal.SIGIO], 1)
try:
signal.sigtimedwait([signal.SIGIO], 1)
except InterruptedError:
# Thrown if any other signal is received.
pass
continue
try:
id, cmd_type, *rest = json.loads(line)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment