GH-85118: Add SEM_FAILCRITICALERRORS to SuppressCrashReport call to SetErrorMode (GH-103697)

serhiy-storchaka <[email protected]> Sun, 09 Aug 2026 13:31:25 -0400 (EDT)
Newsgroups gmane.comp.python.cvs
Message-ID <[email protected]>
https://github.com/python/cpython/commit/b5c74a6fb790010e720a0b62c2721cc0f9bbffe9
commit: b5c74a6fb790010e720a0b62c2721cc0f9bbffe9
branch: main
author: eklopfer <[email protected]>
committer: serhiy-storchaka <[email protected]>
date: 2026-08-09T17:31:05Z
summary:

GH-85118: Add SEM_FAILCRITICALERRORS to SuppressCrashReport call to SetErrorMode (GH-103697)

Co-authored-by: Oleg Iarygin <[email protected]>

files:
M Lib/test/support/__init__.py

diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py
index 74d3794289bf69f..897c210f4767e1d 100644
--- a/Lib/test/support/__init__.py
+++ b/Lib/test/support/__init__.py
@@ -1940,7 +1940,8 @@ def __enter__(self):
 
             self.old_value = msvcrt.GetErrorMode()
 
-            msvcrt.SetErrorMode(self.old_value | msvcrt.SEM_NOGPFAULTERRORBOX)
+            msvcrt.SetErrorMode(self.old_value | msvcrt.SEM_NOGPFAULTERRORBOX
+                                               | msvcrt.SEM_FAILCRITICALERRORS)
 
             # bpo-23314: Suppress assert dialogs in debug builds.
             # CrtSetReportMode() is only available in debug build.

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]