Issue 5619: Pass MS CRT debug flags into subprocesses

This commit is contained in:
Jesse Noller 2009-03-31 22:20:35 +00:00
parent b7715865e7
commit 42f9b4e5b4
4 changed files with 12 additions and 0 deletions

View File

@ -685,6 +685,7 @@ Daniel Stutzbach
Nathan Sullivan
Mark Summerfield
Hisao Suzuki
Andrew Svetlov
Kalle Svensson
Paul Swartz
Thenault Sylvain

View File

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

View 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;

View File

@ -1634,6 +1634,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);