Using SDL_INIT_JOYSTICK implies SDL_INIT_EVENTS which installs a signal handler for SIGINT and SIGTERM. There will be a way to prevent this in 2.0.4 but for now we'll need to handle SDL_QUIT.