mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-11-16 16:54:51 +02:00
Add freeze_support() for multiprocessing
This commit is contained in:
parent
3c4b5db1ca
commit
aac6fbfc31
@ -32,6 +32,8 @@ import os
|
|||||||
import sys
|
import sys
|
||||||
import types
|
import types
|
||||||
|
|
||||||
|
from multiprocessing import freeze_support
|
||||||
|
|
||||||
# To avoid strange bug later we switch the event loop before any other operation
|
# To avoid strange bug later we switch the event loop before any other operation
|
||||||
if sys.platform.startswith("win"):
|
if sys.platform.startswith("win"):
|
||||||
import asyncio
|
import asyncio
|
||||||
@ -79,6 +81,8 @@ def main():
|
|||||||
if not sys.platform.startswith("win"):
|
if not sys.platform.startswith("win"):
|
||||||
if "--daemon" in sys.argv:
|
if "--daemon" in sys.argv:
|
||||||
daemonize()
|
daemonize()
|
||||||
|
else:
|
||||||
|
freeze_support()
|
||||||
from gns3server.run import run
|
from gns3server.run import run
|
||||||
run()
|
run()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user