Merge branch 'michal/prevent-cygwin-from-concealing-non-abort-crashes-v9_14' into 'v9_14'

Prevent Cygwin from concealing non-abort() crashes

See merge request isc-projects/bind9!2394
This commit is contained in:
Michał Kępień
2019-09-26 04:38:08 -04:00

View File

@@ -110,6 +110,16 @@ named_os_init(const char *progname) {
* ntservice_init();
*/
version_check(progname);
/*
* If running in a Cygwin environment, clear the SEM_NOGPFAULTERRORBOX
* bit in the process error mode to prevent Cygwin from concealing
* non-abort() crashes, giving Windows Error Reporting a chance to
* handle such crashes. This is done to ensure all crashes triggered
* by system tests can be detected.
*/
if (getenv("CYGWIN") != NULL) {
SetErrorMode(GetErrorMode() & ~SEM_NOGPFAULTERRORBOX);
}
}
void