From 7fbd959080606d7ff30717724545bd6be97575da Mon Sep 17 00:00:00 2001 From: cxl Date: Mon, 17 Jul 2017 11:08:59 +0000 Subject: [PATCH] Core: Fixed issue in LocalProcess git-svn-id: svn://ultimatepp.org/upp/trunk@11260 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/Core/LocalProcess.cpp | 29 +++-------------------------- 1 file changed, 3 insertions(+), 26 deletions(-) diff --git a/uppsrc/Core/LocalProcess.cpp b/uppsrc/Core/LocalProcess.cpp index 9a1da431c..94b9723ba 100644 --- a/uppsrc/Core/LocalProcess.cpp +++ b/uppsrc/Core/LocalProcess.cpp @@ -605,40 +605,17 @@ void LocalProcess::CloseWrite() #endif } -/* int LocalProcess::Finish(String& out) { out.Clear(); while(IsRunning()) { String h = Get(); -// if(IsNull(h)) -// Sleep(1); // p.Wait would be much better here! -// else - out.Cat(h); + if(IsNull(h)) Sleep(1); // p.Wait would be much better here! + else + out.Cat(h); } - LLOG("Finish: About to read the rest of output"); - - for(;;) { - String h = Get(); -// DDUMP(h.GetCount()); -// DDUMP(h.IsVoid()); - if(h.IsVoid()) - break; - out.Cat(h); - } - return GetExitCode(); -} -*/ - -int LocalProcess::Finish(String& out) -{ - out.Clear(); - while(IsRunning()) { - out.Cat(Get()); - Sleep(1); // p.Wait would be much better here! - } for(;;) { String h = Get(); if(h.IsVoid())