提交 e51cfe0a 编写于 作者: L Lukáš Doktor

utils.process: Use actual duration instead of timeout value

The interrupted message might be slightly misleading as there are
several timeouts before declaring the process interrupted and the wait
might not be issued immediatelly so let's use the (time - start_time)
value instead of timeout value.
Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
上级 bede34f8
......@@ -822,7 +822,8 @@ class SubProcess(object):
the specified timeout.
"""
def nuke_myself():
self.result.interrupted = "timeout after %ss" % timeout
self.result.interrupted = ("timeout after %ss"
% (time.time() - self.start_time))
try:
kill_process_tree(self.get_pid(), sig, timeout=1)
except Exception:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册