Closes #25789: Improved buffering behaviour in launcher.

This commit is contained in:
Vinay Sajip 2015-12-26 12:35:47 +00:00
parent f9253c96fd
commit aab9f46c6d
1 changed files with 3 additions and 2 deletions

View File

@ -98,7 +98,7 @@ error(int rc, wchar_t * format, ... )
MessageBox(NULL, message, TEXT("Python Launcher is sorry to say ..."), MessageBox(NULL, message, TEXT("Python Launcher is sorry to say ..."),
MB_OK); MB_OK);
#endif #endif
ExitProcess(rc); exit(rc);
} }
/* /*
@ -652,7 +652,7 @@ run_child(wchar_t * cmdline)
if (!ok) if (!ok)
error(RC_CREATE_PROCESS, L"Failed to get exit code of process"); error(RC_CREATE_PROCESS, L"Failed to get exit code of process");
debug(L"child process exit code: %d\n", rc); debug(L"child process exit code: %d\n", rc);
ExitProcess(rc); exit(rc);
} }
static void static void
@ -1357,6 +1357,7 @@ process(int argc, wchar_t ** argv)
wchar_t * av[2]; wchar_t * av[2];
#endif #endif
setvbuf(stderr, (char *)NULL, _IONBF, 0);
wp = get_env(L"PYLAUNCH_DEBUG"); wp = get_env(L"PYLAUNCH_DEBUG");
if ((wp != NULL) && (*wp != L'\0')) if ((wp != NULL) && (*wp != L'\0'))
log_fp = stderr; log_fp = stderr;