Re: [pstreams-users] output from stderr unreadable
Brought to you by:
redi
From: Jonathan W. <pst...@ka...> - 2010-03-19 22:24:44
|
On 16 March 2010 19:08, Carsten Rütz wrote: > Hello, > > I've got a problem when executing a command that writes an error message > to stderr. I simply cannot read the output on stderr: > > int main() { > redi::ipstream in("ls -T -l", redi::pstreambuf::pstderr); > > string line; > cout << "the error lines: " << endl; > if(in.is_open()) { > while(getline(in, line)) Hi, sorry for taking so long to reply. you need to call in.err() so that the stderr stream is active. Otherwise you are reading the stdout output. Regards, Jonathan |