Comment on attachment 8750107 Bug 336193 handle SIGTERM in SignalPipeWatcher then in the main thread to quit
I think this approach will work well, thanks. SIGTERM will have no effect if Firefox gets stuck during shutdown, but I guess that's reasonable because SIGTERM is intended to effect normal shutdown. If Firefox shutdown is broken in such a way that it gets stuck, then other signals are available to terminate the process. The alternative of reinstating the previous handler after the first SIGTERM would lead to the disadvantage that two SIGTERMs would terminate the app before shutdown completes even if shutdown would otherwise complete as expected. > #endif > >+ > *aRetVal = true; No extra newline here please. >+ die_cb(NULL, NULL); nullptr https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#CC_practices >+namespace { >+ void termSignalHandler(const uint8_t aRecvSig) { Please use static instead of the anonymous namespace. https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Anonymous_namespaces Gecko capitalizes the first letter of C++ method names (distinct from variable names). >+ RefPtr<QuitTask> task = new QuitTask(); >+ NS_DispatchToMainThread(task); NS_DispatchToMainThread(task.forget()); to save unnecessary ref count toggle. Please also remove the trailing whitespace in this patch. Some changes will be needed to merge with changes for bug 1372405. NS_NewRunnableFunction() may be useful. -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to firefox in Ubuntu. https://bugs.launchpad.net/bugs/73536 Title: MASTER Firefox crashes on instant X server shutdown Status in Mozilla Firefox: In Progress Status in firefox package in Ubuntu: Won't Fix Status in firefox-3.0 package in Ubuntu: Triaged Bug description: Firefox crashes when X server is forcefully torn down (e.g. by pressing ctrl-alt-backspace) and a crash report gets generated on next login. (Original Report: I've reproduced it once on my machine with the following steps. With, oh, about 5 tabs open, I just pressed ctrl-alt-backspace, logged back in when the X server restarted, and FF crashed with a bug report when Gnome tried to restore the session. It's not terribly important, I don't think anyone does this very often, but maybe it'll be helpful. ) To manage notifications about this bug go to: https://bugs.launchpad.net/firefox/+bug/73536/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp