From 20294e284c540a5ce1ceab7c82f1d0c8fca569c9 Mon Sep 17 00:00:00 2001 From: grossmj Date: Fri, 27 Apr 2018 17:00:28 +0700 Subject: [PATCH] Fix exception from send_signal() on Windows. --- gns3server/compute/vpcs/vpcs_vm.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gns3server/compute/vpcs/vpcs_vm.py b/gns3server/compute/vpcs/vpcs_vm.py index 787c0aa6..6449bb94 100644 --- a/gns3server/compute/vpcs/vpcs_vm.py +++ b/gns3server/compute/vpcs/vpcs_vm.py @@ -313,7 +313,10 @@ class VPCSVM(BaseNode): log.info("Stopping VPCS instance {} PID={}".format(self.name, self._process.pid)) if sys.platform.startswith("win32"): - self._process.send_signal(signal.CTRL_BREAK_EVENT) + try: + self._process.send_signal(signal.CTRL_BREAK_EVENT) + except OSError: + pass else: try: self._process.terminate()