diff --git a/Misc/ACKS b/Misc/ACKS index 7d4c1bf036c..8ca5b7ff96e 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -689,6 +689,7 @@ Daniel Stutzbach Nathan Sullivan Mark Summerfield Hisao Suzuki +Andrew Svetlov Kalle Svensson Andrew Svetlov Paul Swartz diff --git a/Misc/NEWS b/Misc/NEWS index a52e37aa0ee..916a2c9926c 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -53,6 +53,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 #5400: Added patch for multiprocessing on netbsd compilation/support - Issue #5387: Fixed mmap.move crash by integer overflow. diff --git a/Modules/_multiprocessing/win32_functions.c b/Modules/_multiprocessing/win32_functions.c index 379a49515e3..ba82c23517c 100644 --- a/Modules/_multiprocessing/win32_functions.c +++ b/Modules/_multiprocessing/win32_functions.c @@ -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; diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 7add832387c..27c9d23ea5c 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -2006,6 +2006,7 @@ void Py_FatalError(const char *msg) { fprintf(stderr, "Fatal Python error: %s\n", msg); + fflush(stderr); /* it helps in Windows debug build */ if (PyErr_Occurred()) { PyErr_Print(); }