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 Nov 1, 2023
1 parent f46a259 commit fe64f34
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 @@ -2399,6 +2399,15 @@ def run_glprobe(opts, show=False) -> int:
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 fe64f34

Please sign in to comment.