]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Merged revisions 70908 via svnmerge from
authorJesse Noller <jnoller@gmail.com>
Tue, 31 Mar 2009 22:25:20 +0000 (22:25 +0000)
committerJesse Noller <jnoller@gmail.com>
Tue, 31 Mar 2009 22:25:20 +0000 (22:25 +0000)
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70908 | jesse.noller | 2009-03-31 17:20:35 -0500 (Tue, 31 Mar 2009) | 1 line

  Issue 5619: Pass MS CRT debug flags into subprocesses
........

Misc/ACKS
Misc/NEWS
Modules/_multiprocessing/win32_functions.c
Python/pythonrun.c

index a0166a522b884d15e2835d2e60c8d4cf7f5e56e1..79b74671245301961123c36210ef957e85ee0fb7 100644 (file)
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -674,6 +674,7 @@ Daniel Stutzbach
 Nathan Sullivan
 Mark Summerfield
 Hisao Suzuki
+Andrew Svetlov
 Kalle Svensson
 Paul Swartz
 Thenault Sylvain
index 21268feab68c0dd306791f5c9ccd3b7cf6e4c8d5..d6bc73a9cd986b3bece345da0137a90742b096fb 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -92,6 +92,9 @@ Core and Builtins
 Library
 -------
 
+- Issue #5619: Multiprocessing children disobey the debug flag and causes
+  popups on windows buildbots. Patch applied to work around this issue.
+
 - Issue #5632: Thread.ident was None for the main thread and threads not created
   with the threading module.
 
index 513fc02b1a5d1cfa8a77c81fe4e0bce1b4e92214..549c15198301f303f7cf9591a234d159ccdb0d36 100644 (file)
@@ -130,6 +130,12 @@ win32_ExitProcess(PyObject *self, PyObject *args)
        if (!PyArg_ParseTuple(args, "I", &uExitCode))
                return NULL;
 
+       #if defined(Py_DEBUG)
+               SetErrorMode(SEM_FAILCRITICALERRORS|SEM_NOALIGNMENTFAULTEXCEPT|SEM_NOGPFAULTERRORBOX|SEM_NOOPENFILEERRORBOX);
+               _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG);
+       #endif
+
+
        ExitProcess(uExitCode);
 
        return NULL;
index f2cd819b1c4d2de1e5300c88f43930ef48789b5d..38db290ea75cfe4606dc2d055372b327c4f8a4cc 100644 (file)
@@ -1631,6 +1631,8 @@ void
 Py_FatalError(const char *msg)
 {
        fprintf(stderr, "Fatal Python error: %s\n", msg);
+       fflush(stderr); /* it helps in Windows debug build */
+
 #ifdef MS_WINDOWS
        {
                size_t len = strlen(msg);