use _Exit(0) on linux

This commit is contained in:
briaguya 2022-05-23 14:41:38 -04:00
commit 1b3907f232
2 changed files with 10 additions and 0 deletions

View file

@ -440,7 +440,12 @@ static void gfx_glx_handle_events(void) {
} }
} }
if (xev.type == ClientMessage && (Atom)xev.xclient.data.l[0] == glx.atom_wm_delete_window) { if (xev.type == ClientMessage && (Atom)xev.xclient.data.l[0] == glx.atom_wm_delete_window) {
#ifndef __linux__
exit(0); exit(0);
#endif
#ifdef __linux__
_Exit(0);
#endif
} }
} }
} }

View file

@ -250,7 +250,12 @@ static void gfx_sdl_handle_events(void) {
} }
break; break;
case SDL_QUIT: case SDL_QUIT:
#ifndef __linux__
exit(0); exit(0);
#endif
#ifdef __linux__
_Exit(0);
#endif
} }
} }
} }