aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/sos1
-rw-r--r--sos/utilities.py3
2 files changed, 3 insertions, 1 deletions
diff --git a/bin/sos b/bin/sos
index 179b2d26..323c6ec6 100755
--- a/bin/sos
+++ b/bin/sos
@@ -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: