Fix race condition when killing iouyap

Fix #387
This commit is contained in:
Julien Duponchelle 2016-01-04 10:42:46 +01:00
parent 137cf59e97
commit fab8b3f46f

View File

@ -676,7 +676,10 @@ class IOUVM(BaseVM):
except asyncio.TimeoutError:
if self._iouyap_process.returncode is None:
log.warn("IOUYAP process {} is still running... killing it".format(self._iouyap_process.pid))
self._iouyap_process.kill()
try:
self._iouyap_process.kill()
except ProcessLookupError:
pass
self._iouyap_process = None
self._started = False