Created attachment 8750107 Bug 336193 handle SIGTERM in SignalPipeWatcher then in the main thread to quit
What about the attempt in this patch? I intercept SIGTERM using "SignalPipeWatcher" as suggested, then I pass a task to the main thread so it calls "nsIAppStartup::Quit(nsIAppStartup::eForceQuit)".
That may seem convoluted, it would look better if it was done in one go.
I don't have any experience on the Firefox codebase, so I may completely misunderstand the issues. If "Quit" is executed by the main thread (like it would be after a keyboard key for example), wouldn't it avoid the aforementioned problems with the locks.
Created attachment 8750107
Bug 336193 handle SIGTERM in SignalPipeWatcher then in the main thread to quit
What about the attempt in this patch? I intercept SIGTERM using "SignalPipeWatcher" as suggested, then I pass a task to the main thread so it calls "nsIAppStartup: :Quit(nsIAppSta rtup::eForceQui t)".
That may seem convoluted, it would look better if it was done in one go.
I don't have any experience on the Firefox codebase, so I may completely misunderstand the issues. If "Quit" is executed by the main thread (like it would be after a keyboard key for example), wouldn't it avoid the aforementioned problems with the locks.