(In reply to Michael Wu [:mwu] from comment #22)
> 1. You should probably use nsAppStartup::Quit because it will do the Right
> Things. This includes sending the proper shutdown notifications to code that
> needs to clean up.
Mmm, good point.
> 2. Should probably make this generic enough to work on all unixish systems
> instead of just GTK2. Sounds like ted's second suggestion does that.
It does, but it runs rather a lot of code from inside the signal handler, which seems like a Bad Idea. To make sure things run from outside the signal handler, we need integration with the event loop. I guess we could have nsAppShell::PostSignalEvent(int signum) with a default do-nothing implementation?
(In reply to Michael Wu [:mwu] from comment #22)
> 1. You should probably use nsAppStartup::Quit because it will do the Right
> Things. This includes sending the proper shutdown notifications to code that
> needs to clean up.
Mmm, good point.
> 2. Should probably make this generic enough to work on all unixish systems
> instead of just GTK2. Sounds like ted's second suggestion does that.
It does, but it runs rather a lot of code from inside the signal handler, which seems like a Bad Idea. To make sure things run from outside the signal handler, we need integration with the event loop. I guess we could have nsAppShell: :PostSignalEven t(int signum) with a default do-nothing implementation?