mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Catch SIGTERM, SIGINT, SIGHUP and SIGQUIT to properly shutdown the
server.
This commit is contained in:
1 parent
2f23a092e3
commit
798f0367b9
3 files changed
+10
-1
No files matched your search
+1
-1
@@ -15,5 +15,5 @@ def server(request):
|
||||
server_script = os.path.join(cwd, "../gns3server/main.py")
|
||||
process = subprocess.Popen([sys.executable, server_script, "--port=8000"])
|
||||
time.sleep(0.1) # give some time for the process to start
|
||||
request.addfinalizer(process.kill)
|
||||
request.addfinalizer(process.terminate)
|
||||
return process
|
||||
Reference in new issue
Block a user