Core: Fixed issue in LocalProcess

git-svn-id: svn://ultimatepp.org/upp/trunk@11260 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2017-07-17 11:08:59 +00:00
parent 90fe80d9bb
commit 7fbd959080

View file

@ -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())