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,447
  • 6
  • 25
  • 48
  • 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
  • 19,903
  • 2
  • 35
  • 49