Using this trick from the Java CEF library, we can back up our process's signal handlers then restore them after calling CefInitialize.
Motivation and Context
CefInitialize likes to wipe all of our precious POSIX signal handlers, leading to an unsafe shutdown if SIGINT is raised and there are browsers running.
How Has This Been Tested?
Ubuntu 20.04 Desktop
Before:
SIGINT to OBS with no browsers: Safe shutdown
SIGINT to OBS with browsers running: Instant exit (unsafe shutdown)
After:
SIGINT to OBS with browsers running: Safe shutdown
Types of changes
Bug fix (non-breaking change which fixes an issue)
Description
Using this trick from the Java CEF library, we can back up our process's signal handlers then restore them after calling CefInitialize.
Motivation and Context
CefInitialize likes to wipe all of our precious POSIX signal handlers, leading to an unsafe shutdown if SIGINT is raised and there are browsers running.
How Has This Been Tested?
Ubuntu 20.04 Desktop
Before:
SIGINT
to OBS with no browsers: Safe shutdownSIGINT
to OBS with browsers running: Instant exit (unsafe shutdown)After:
SIGINT
to OBS with browsers running: Safe shutdownTypes of changes
Checklist: