[AD] OSX - Cmd-Q Exit is really a crash

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


In Christer's little program (the one that hangs Linux), there's no way to exit apart from pressing cmd-Q. I noticed that this doesn't exit cleanly, it actually crashes the program, in fullscreen mode. The attached patch improves matters, in that the program will always pass through allegro_exit(), but it is still rather ugly.

The reason is that the user's program runs in thread #2, but the signal is caught in thread #1. Usually thread #1 terminates the program before #2 has time to do anything else but sometimes it doesn't, and thread #2 finds that the rug has been pulled from under its feet, so to speak.

Therefore the current solution has the desired effect (terminating the program) but is not very elegant.

Any signals experts out there can help?

Pete

Attachment: osxexit.diff
Description: Binary data




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/