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

Prevent Cygwin from concealing non-abort() crashes

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

View File

@@ -109,6 +109,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