0

Is it possible read the standard error generated by a wrong bash function in C++? For example if I use the popen function, can I read the standard error with cerr and handle it?

user840718
  • 1,563
  • 6
  • 29
  • 54
  • You might want to look at http://stackoverflow.com/questions/280571/how-to-control-popen-stdin-stdout-stderr-redirection – Tony Delroy Apr 16 '12 at 09:53

1 Answers1

1

I'm guessing you're looking for dup that allows duplicating opened file descriptors (one of them would be stderr).

littleadv
  • 20,100
  • 2
  • 36
  • 50