Here's a revised version of the SignalPipeWatcher patch.
* SIGTERM/SIGINT/SIGHUP all do a graceful exit. I tested Chromium, VLC and GIMP using strace with these signals and they all exit normally returning exit codes and not signals.
* SignalPipeWatcher does not chain to previous handler and registers after nsProfileLock so it takes over for these signals. The nsProfileLock signal handler is unwanted since we are doing a normal exit which unlocks the profile in the destructor.
* After the first termination attempt the previous handler is restored so subsequent attempts can unlock the profile and kill the process immediately like before.
Here's a revised version of the SignalPipeWatcher patch.
* SIGTERM/ SIGINT/ SIGHUP all do a graceful exit. I tested Chromium, VLC and GIMP using strace with these signals and they all exit normally returning exit codes and not signals.
* SignalPipeWatcher does not chain to previous handler and registers after nsProfileLock so it takes over for these signals. The nsProfileLock signal handler is unwanted since we are doing a normal exit which unlocks the profile in the destructor.
* After the first termination attempt the previous handler is restored so subsequent attempts can unlock the profile and kill the process immediately like before.