Comment on attachment 8959924 Bug 336193 - P1: Use SignalPipeWatcher to detect signals SIGTERM/SIGINT/SIGHUP and quit application gracefully.
https://reviewboard.mozilla.org/r/228682/#review235302 > I based this off nsProfileLock's CATCH_SIGNAL() which does not register for signal handlers that have already been set to SIG_IGN. I guess the logic is that if some other component has already chosen to ignore the signal then there is probably a good reason for that and we shouldn't interfere. It would also be inconsistent if we treated it like normal, started shutdown and then restored SIG_IGN which would not follow through with killing the process for subsequent termination attempts. It is always possible to change the signal handler to something else before calling RegisterCallback() to get around this if need be. SignalPipeWatcher is more general than just handling termination signals (although the SignalPipeWatcher interface is not documented and so it is not clear what it is suitable for, and the whole situation with others also calling sigaction for the same signals is already delicate), and so I wouldn't treat the SIG_IGN case special if I were writing this myself. Changing the signal handler to something else before calling RegisterCallback, doesn't work so well with UnregisterCallback. But I checked "The default action for an unhandled real-time signal is to terminate the receiving process." and so the existing client, nsMemoryInfoDumper should not trigger this case. That makes this harmless for now at least, and so feel free to drop this issue if you prefer. At least we have a record of the reason for the check, so that someone can re-evaluate later if required. -- 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