diff options
-rwxr-xr-x | bin/sos | 1 | ||||
-rw-r--r-- | sos/utilities.py | 3 |
2 files changed, 3 insertions, 1 deletions
@@ -20,5 +20,6 @@ except KeyboardInterrupt: if __name__ == '__main__': sos = SoS(sys.argv[1:]) sos.execute() + os._exit(0) # vim:ts=4 et sw=4 diff --git a/sos/utilities.py b/sos/utilities.py index cefaa307..4556632a 100644 --- a/sos/utilities.py +++ b/sos/utilities.py @@ -176,7 +176,7 @@ def sos_get_command_output(command, timeout=TIMEOUT_DEFAULT, stderr=False, os.chdir(chdir) def _check_poller(proc): - if poller(): + if poller() or proc.poll() == 124: proc.terminate() raise SoSTimeoutError time.sleep(0.01) @@ -240,6 +240,7 @@ def sos_get_command_output(command, timeout=TIMEOUT_DEFAULT, stderr=False, _output.close() # until we separate timeouts from the `timeout` command # handle per-cmd timeouts via Plugin status checks + reader.running = False return {'status': 124, 'output': reader.get_contents(), 'truncated': reader.is_full} if to_file: |