mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Catch exception when a process cannot be killed. Fixes #296.
This commit is contained in:
1 parent
eb5f9c48f2
commit
fda33c56de
3 files changed
+14
-5
No files matched your search
@@ -604,9 +604,12 @@ class QemuVM(BaseVM):
|
||||
self._process.terminate()
|
||||
self._process.wait()
|
||||
except subprocess.TimeoutExpired:
|
||||
self._process.kill()
|
||||
try:
|
||||
self._process.kill()
|
||||
except OSError as e:
|
||||
log.error("Cannot stop the Qemu process: {}".format(e))
|
||||
if self._process.returncode is None:
|
||||
log.warn('QEMU VM "{}" PID={} is still running'.format(self._name, self._process.pid))
|
||||
log.warn('QEMU VM "{}" with PID={} is still running'.format(self._name, self._process.pid))
|
||||
self._process = None
|
||||
self._started = False
|
||||
self._stop_cpulimit()
|
||||
|
||||
Reference in new issue
Block a user