mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-24 17:28:08 +00:00
Add the fault handler in order to try to get a proper crash stack
This commit is contained in:
parent
221a35baae
commit
0c5b753211
@ -19,6 +19,10 @@ import os
|
|||||||
import sys
|
import sys
|
||||||
import struct
|
import struct
|
||||||
import platform
|
import platform
|
||||||
|
import faulthandler
|
||||||
|
|
||||||
|
# Display a traceback in case of segfault crash. Usefull when frozen
|
||||||
|
faulthandler.enable()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import raven
|
import raven
|
||||||
|
@ -190,6 +190,8 @@ def main():
|
|||||||
port = int(server_config["port"])
|
port = int(server_config["port"])
|
||||||
server = Server.instance(host, port)
|
server = Server.instance(host, port)
|
||||||
try:
|
try:
|
||||||
|
import faulthandler
|
||||||
|
faulthandler._sigsegv()
|
||||||
server.run()
|
server.run()
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
# This is to ignore OSError: [WinError 0] The operation completed successfully exception on Windows.
|
# This is to ignore OSError: [WinError 0] The operation completed successfully exception on Windows.
|
||||||
|
Loading…
Reference in New Issue
Block a user