]> granicus.if.org Git - python/commitdiff
Closes #25789: Improved buffering behaviour in launcher.
authorVinay Sajip <vinay_sajip@yahoo.co.uk>
Sat, 26 Dec 2015 12:35:47 +0000 (12:35 +0000)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>
Sat, 26 Dec 2015 12:35:47 +0000 (12:35 +0000)
PC/launcher.c

index f7a0917c520701e200f0a1cff9295a779c82822f..02cd9b99e6d7416d754feb0b8c5c6ce61732121d 100644 (file)
@@ -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;