]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/utilsexc.cpp
don't use negative PID hack in GUI neither, add a separate flag to wxEndProcessData...
[wxWidgets.git] / src / msw / utilsexc.cpp
index a675969f7e421166efbc93912afdb55eac0e66dc..456594d8342ed25c11d7306afd86f979e783baea 100644 (file)
@@ -987,13 +987,13 @@ long wxExecute(const wxString& cmd, int flags, wxProcess *handler)
     while ( data->state )
     {
 #if wxUSE_STREAMS && !defined(__WXWINCE__)
-        bufOut.Update();
-        bufErr.Update();
+        if ( !bufOut.Update() && !bufErr.Update() )
 #endif // wxUSE_STREAMS
-
-        // don't eat 100% of the CPU -- ugly but anything else requires
-        // real async IO which we don't have for the moment
-        ::Sleep(50);
+        {
+            // don't eat 100% of the CPU -- ugly but anything else requires
+            // real async IO which we don't have for the moment
+            ::Sleep(50);
+        }
 
         // we must process messages or we'd never get wxWM_PROC_TERMINATED
         traits->AlwaysYield();