Jonathan Polley wrote:
> Fred,
>
> It turns out that the problem should exist on every FlightGear
> system, not just the Mac. On exit(), fgExitCleanup() is called which
> deletes the globals class and then calls fgOSExit(). The only thing
> that fgOSExit() does is turn around and call exit(), which repeats the
> process. I changed fgExitCleanup() in main.cxx to be as follows:
>
> void fgExitCleanup() {
> delete globals;
> //fgOSExit(0);
> }
>
> This prevented the recursive call to exit(), but will not work if
> someone is using the fg_os_sld.cxx module, but it works for me.
I proposed two patches but there is a question that maybe Andy could
answer : what is the purpose of fgOSExit ? It comes to me because
this function, is called only once in FlightGear while exit is called
at many locations. fgOSExit is just calling exit for the glut version
and SDL_Quit() + exit in the sdl version.
What about calling SDL_Quit in a function installed by 'atexit', remove
fgOSExit and only rely on exit in all the program ?
-Fred
_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel