Skip to content

Commit c4d063f

Browse files
author
jesse.noller
committed
Merged revisions 70908 via svnmerge from
svn+ssh://[email protected]/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 ........ git-svn-id: http://svn.python.org/projects/python/branches/py3k@70913 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent 518d363 commit c4d063f

4 files changed

Lines changed: 11 additions & 0 deletions

File tree

Misc/ACKS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,7 @@ Daniel Stutzbach
689689
Nathan Sullivan
690690
Mark Summerfield
691691
Hisao Suzuki
692+
Andrew Svetlov
692693
Kalle Svensson
693694
Andrew Svetlov
694695
Paul Swartz

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ Core and Builtins
5353
Library
5454
-------
5555

56+
- Issue #5619: Multiprocessing children disobey the debug flag and causes
57+
popups on windows buildbots. Patch applied to work around this issue.
58+
5659
- Issue #5400: Added patch for multiprocessing on netbsd compilation/support
5760

5861
- Issue #5387: Fixed mmap.move crash by integer overflow.

Modules/_multiprocessing/win32_functions.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,12 @@ win32_ExitProcess(PyObject *self, PyObject *args)
130130
if (!PyArg_ParseTuple(args, "I", &uExitCode))
131131
return NULL;
132132

133+
#if defined(Py_DEBUG)
134+
SetErrorMode(SEM_FAILCRITICALERRORS|SEM_NOALIGNMENTFAULTEXCEPT|SEM_NOGPFAULTERRORBOX|SEM_NOOPENFILEERRORBOX);
135+
_CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG);
136+
#endif
137+
138+
133139
ExitProcess(uExitCode);
134140

135141
return NULL;

Python/pythonrun.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2006,6 +2006,7 @@ void
20062006
Py_FatalError(const char *msg)
20072007
{
20082008
fprintf(stderr, "Fatal Python error: %s\n", msg);
2009+
fflush(stderr); /* it helps in Windows debug build */
20092010
if (PyErr_Occurred()) {
20102011
PyErr_Print();
20112012
}

0 commit comments

Comments
 (0)