diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2015-12-26 12:35:47 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2015-12-26 12:35:47 (GMT) |
commit | aab9f46c6d5508383709f8722a9328fa76dd8c1b (patch) | |
tree | 77efab4e9ffb0d5b7f4254ec11830e1fcb61e032 /PC | |
parent | f9253c96fdff3ae1fcdacc72c06632f41df0424c (diff) | |
download | cpython-aab9f46c6d5508383709f8722a9328fa76dd8c1b.zip cpython-aab9f46c6d5508383709f8722a9328fa76dd8c1b.tar.gz cpython-aab9f46c6d5508383709f8722a9328fa76dd8c1b.tar.bz2 |
Closes #25789: Improved buffering behaviour in launcher.
Diffstat (limited to 'PC')
-rw-r--r-- | PC/launcher.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/PC/launcher.c b/PC/launcher.c index f7a0917..02cd9b9 100644 --- a/PC/launcher.c +++ b/PC/launcher.c @@ -98,7 +98,7 @@ error(int rc, wchar_t * format, ... ) MessageBox(NULL, message, TEXT("Python Launcher is sorry to say ..."), MB_OK); #endif - ExitProcess(rc); + exit(rc); } /* @@ -652,7 +652,7 @@ run_child(wchar_t * cmdline) if (!ok) error(RC_CREATE_PROCESS, L"Failed to get exit code of process"); debug(L"child process exit code: %d\n", rc); - ExitProcess(rc); + exit(rc); } static void @@ -1357,6 +1357,7 @@ process(int argc, wchar_t ** argv) wchar_t * av[2]; #endif + setvbuf(stderr, (char *)NULL, _IONBF, 0); wp = get_env(L"PYLAUNCH_DEBUG"); if ((wp != NULL) && (*wp != L'\0')) log_fp = stderr; |