I wonder if I am doing something wrong. Here is a piece of my code:
- Code: Select all
Pipe outPipe;
Pipe errPipe;
ProcessHandle ph = Process::launch(mMPlayerPath, args, 0, &outPipe, &errPipe);
std::string outString;
std::string errorString;
PipeInputStream istr(outPipe);
PipeInputStream error_istr(errPipe);
bool keepGoing = true;
while (keepGoing)
{
int c = istr.get();
if (c != -1)
{
outString += (char) c;
}
int e = error_istr.get();
if (e != -1)
{
errorString += (char)e;
}
keepGoing = ((c != -1) || (e != -1));
}
Can anyone point me out my error? I think the problem is not in Poco because I've had the same problem occur when using Cocoa's NSTask.
Thanks!
Francis





