Fix SIGTERM signal handling
asix uses the SIGTERM signal to rerun the simulation. Since SDL2 registers a signal handler, killing the old simulation does not have any effect. The usual way to deal with that is to poll SDL events, but since SDL is only used for audio here, a single line change does the job.
This commit is contained in:
12
debian/patches/remove-sdl-signal-handler.patch
vendored
Normal file
12
debian/patches/remove-sdl-signal-handler.patch
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
--- a/src/tone/tone.cpp
|
||||
+++ b/src/tone/tone.cpp
|
||||
@@ -248,7 +248,8 @@
|
||||
|
||||
void initTone() {
|
||||
|
||||
- if(SDL_Init( SDL_INIT_AUDIO ) < 0) {
|
||||
+ SDL_SetHint(SDL_HINT_NO_SIGNAL_HANDLERS, "1");
|
||||
+ if(SDL_Init( SDL_INIT_AUDIO ) < 0) {
|
||||
printf("Erreur d'initialisation de la SDL : %s",SDL_GetError());//on affiche l'erreur
|
||||
exit( EXIT_FAILURE);
|
||||
}
|
Reference in New Issue
Block a user