[Kimchi-devel] [PATCH V3] add a synchronous function with timeout to execute command

shaohef at linux.vnet.ibm.com shaohef at linux.vnet.ibm.com
Tue Jan 14 13:03:00 UTC 2014


From: ShaoHe Feng <shaohef at linux.vnet.ibm.com>

V2 -> V3
address zhengsheng's commnet.
raise TimeoutExpired when timeout
do not return timeout_flag

V1 -> V2
check timeout happens and report a specific error
+        if proc.returncode == -9 and timeout_flag[0] is True:
+            kimchi_log.error("subprocess is killed by signal.SIGKILL "
+                             "for timeout %s seconds", timeout)

ShaoHe Feng (1):
  add a synchronous function with timeout to execute command

 src/kimchi/exception.py |  4 ++++
 src/kimchi/utils.py     | 58 +++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 62 insertions(+)

-- 
1.8.4.2




More information about the Kimchi-devel mailing list