From 7cd3655e2e3edc630b21e495438c4b324c50c759 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Fri, 18 Jun 2010 19:49:31 +0000 Subject: Fixed some things that broke when Process changed it's functionality slightly. --- src/functionexecute.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/functionexecute.cpp') diff --git a/src/functionexecute.cpp b/src/functionexecute.cpp index f692036..0b0aabf 100644 --- a/src/functionexecute.cpp +++ b/src/functionexecute.cpp @@ -31,7 +31,7 @@ Variable FunctionExecute::call( Variable &/*input*/, VarList lParams ) Process pCmd( Process::Both, "/bin/bash", "/bin/bash", "-c", lParams.first().getString().getStr(), NULL ); FString sStdOut, sStdErr; - while( pCmd.isRunning() ) + do { char buf[4096]; bool out, err; @@ -49,6 +49,7 @@ Variable FunctionExecute::call( Variable &/*input*/, VarList lParams ) //sio << "Read " << iRead << " bytes of stdout." << sio.nl; } } + while( pCmd.isRunning() ); pContext->getView()->cmdFinished( sStdOut, sStdErr, pCmd.childExitStatus() -- cgit v1.2.3