i am using pipeinputstream to get the output from my subprocess.. i am unable to figure out how to make it unbuffered and i have tried various options but it doesnt seem to work. here is what i have tried so far:
take 1:
- Code: Select all
Poco::Pipe outPipe;
ProcessHandle ph = Poco::Process::launch(makeReplacement, params, 0, &outPipe, &outPipe);
Poco::PipeInputStream istr(outPipe);
std::string line;
while (std::getline( istr, line )) {
proj.projectStream << line;
}
take 2:
- Code: Select all
Poco::Pipe outPipe;
ProcessHandle ph = Poco::Process::launch(makeReplacement, params, 0, &outPipe, &outPipe);
Poco::PipeInputStream istr(outPipe);
istr.rdbuf()->pubsetbuf(0, 0);
Poco::StreamCopier::copyStreamUnbuffered(istr, proj.projectStream);
int retcode = ph.wait();
any help is appreciated!





