mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-04 14:31:13 +02:00
Builtin destination to shutdown the server.
This commit is contained in:
1 parent
ab02925f98
commit
a92da02973
5 files changed
+15
No files matched your search
@@ -113,6 +113,8 @@ class IModule(multiprocessing.Process):
|
||||
signals = [signal.SIGTERM, signal.SIGINT]
|
||||
if not sys.platform.startswith("win"):
|
||||
signals.extend([signal.SIGHUP, signal.SIGQUIT])
|
||||
else:
|
||||
signals.extend([signal.SIGBREAK])
|
||||
for sig in signals:
|
||||
signal.signal(sig, signal_handler)
|
||||
|
||||
|
||||
@@ -127,6 +127,8 @@ class Dynamips(IModule):
|
||||
Properly stops the module.
|
||||
"""
|
||||
|
||||
#if not sys.platform.startswith("win32"):
|
||||
# self._callback.stop()
|
||||
if self._hypervisor_manager:
|
||||
self._hypervisor_manager.stop_all_hypervisors()
|
||||
IModule.stop(self) # this will stop the I/O loop
|
||||
|
||||
@@ -95,6 +95,7 @@ class IOU(IModule):
|
||||
Properly stops the module.
|
||||
"""
|
||||
|
||||
#self._iou_callback.stop()
|
||||
# delete all IOU instances
|
||||
for iou_id in self._iou_instances:
|
||||
iou_instance = self._iou_instances[iou_id]
|
||||
|
||||
Reference in new issue
Block a user