summaryrefslogtreecommitdiff
path: root/testsuite/timeout
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/timeout')
-rw-r--r--testsuite/timeout/timeout.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/testsuite/timeout/timeout.py b/testsuite/timeout/timeout.py
index 51fb63c179..f3468ad9fb 100644
--- a/testsuite/timeout/timeout.py
+++ b/testsuite/timeout/timeout.py
@@ -42,8 +42,12 @@ try:
(pid2, res) = os.waitpid(pid, 0)
if (os.WIFEXITED(res)):
sys.exit(os.WEXITSTATUS(res))
- else:
- sys.exit(res)
+ elif os.WIFSIGNALED(res):
+ # represent signals using the Bourne shell convention
+ sys.exit(128 + os.WTERMSIG(res))
+ else: # WIFCONTINUED or WIFSTOPPED
+ killProcess(pid)
+ sys.exit(99) # unexpected
except KeyboardInterrupt:
sys.exit(98)