Skip to content

Commit

Permalink
#4040 try harder to exit more cleanly on error
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Oct 28, 2023
1 parent 0a63b86 commit a8ca1c0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions xpra/scripts/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2422,6 +2422,15 @@ def run_glprobe(opts, show=False) -> ExitValue:
from xpra.platform.gui import init, set_default_icon
set_default_icon("opengl.png")
init()
import signal

def signal_handler(signum, frame):
os._exit(1)
for name in ("ABRT", "BUS", "FPE", "HUP", "ILL", "INT", "PIPE", "SEGV", "TERM"):
value = getattr(signal, f"SIG{name}", 0)
if value:
signal.signal(value, signal_handler)

props = do_run_glcheck(opts, show)
if not props.get("success", False):
return 3
Expand Down

0 comments on commit a8ca1c0

Please sign in to comment.