mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-15 21:08:55 +00:00
Fix qemu close
This commit is contained in:
parent
15036837bb
commit
47be57dca7
@ -100,7 +100,7 @@ class Qemu(BaseManager):
|
|||||||
return ""
|
return ""
|
||||||
try:
|
try:
|
||||||
output = yield from subprocess_check_output(qemu_path, "-version")
|
output = yield from subprocess_check_output(qemu_path, "-version")
|
||||||
match = re.search("version\s+([0-9a-z\-\.]+)", output.decode("utf-8"))
|
match = re.search("version\s+([0-9a-z\-\.]+)", output)
|
||||||
if match:
|
if match:
|
||||||
version = match.group(1)
|
version = match.group(1)
|
||||||
return version
|
return version
|
||||||
|
@ -601,7 +601,7 @@ class QemuVM(BaseVM):
|
|||||||
log.info("stopping QEMU VM instance {} PID={}".format(self._id, self._process.pid))
|
log.info("stopping QEMU VM instance {} PID={}".format(self._id, self._process.pid))
|
||||||
try:
|
try:
|
||||||
self._process.terminate()
|
self._process.terminate()
|
||||||
self._process.wait(1)
|
self._process.wait()
|
||||||
except subprocess.TimeoutExpired:
|
except subprocess.TimeoutExpired:
|
||||||
self._process.kill()
|
self._process.kill()
|
||||||
if self._process.poll() is None:
|
if self._process.poll() is None:
|
||||||
|
Loading…
Reference in New Issue
Block a user