stdout redirected?

Hi all,

I have a c++ program which is running fine but has some printfs which its spews on to the screen, which I need for debugging.

But, I execute this program through a java, i.e I run a java program which actually launches my c++ executable and when it does this, I see none of my printfs doing their job(or r they?).

Is the stdout being redirected by someone(cause the c++, program is quite old, and has been edited by people earlier to me). what shouls I be looking for in the program to see for redirections. Cause when I searched for stdout to see, if any over riding has been done, couuld not find any.

Is it that, when this c++ program is run under the scope of some other program the stdout points nowhere and all the print messages are obliterated?

Firstly debugging information should go to stderr, not stdout.

When you run the program from within your java program the sterr and stdout are those of the java application, and by default the output from your application is just ignored. In order for them to be displayed you would need to either redirect them to a file, or create pipes for the stdout and stderr from your application and read and them reproduce them to stdout or stderr in your java application. The former would be a lot simpler.