win: Set shutdown order to make the handler shutdown as late as possible

At the default level, we might be terminated before the process we're
watching, which would mean missing shutdown crashes.

R=mark@chromium.org
BUG=crashpad:84

Review URL: https://codereview.chromium.org/1505423002 .
This commit is contained in:
Scott Graham 2015-12-08 16:55:02 -08:00
parent b9e732d318
commit e9a843c626

View File

@ -337,6 +337,10 @@ int HandlerMain(int argc, char* argv[]) {
reset_sigterm.reset(&old_sa);
}
#elif defined(OS_WIN)
// Shut down as late as possible relative to programs we're watching.
if (!SetProcessShutdownParameters(0x100, SHUTDOWN_NORETRY))
PLOG(ERROR) << "SetProcessShutdownParameters";
ExceptionHandlerServer exception_handler_server(!options.pipe_name.empty());
if (!options.pipe_name.empty()) {