Hello all,
SHORT QUESTION :
On Mac OS X, is there a way to prevent the SDL to catch SIGTERM and SIGINT, that is to let CTRL+C kill the program in the Terminal, when no event loop is running ?
Apparently
SDL_SetHint(SDL_HINT_NO_SIGNAL_HANDLERS, "1");
has no effect on the Mac.
LONGER, with context :
I am using SDL2 in a programming teaching context, only to display images in C programs in a portable dev context.
I do not want any even loop.
I do know this is not standard. In fact, on the Mac, I do have to call SDL_PollEvent a few times to ensure the created window is actually displayed…
But for my student having an event loop is not the way to go (they are new to C and programming).
Still, I need them to CTRL-C their program from the Terminal.
APparently
SDL_SetHint(SDL_HINT_NO_SIGNAL_HANDLERS, "1");
has no effect on the Mac (though Mac is a “Unix-like platforms” as mentioned in the doc).
This is the reason for my today’s question :
On Mac OS X, is there a way to prevent the SDL to catch SIGTERM and SIGINT, that is to let CTRL+C kill the program in the Terminal when no event loop is running ?
I thank you all VERY much, for the SDL, and for your upcoming help,
Nicolas