How does ddd redirect stdout?

Jens Ahrens <[email protected]>
Newsgroups gmane.comp.debugging.ddd.general
Organization http://freemail.web.de/
Message-ID <[email protected]>

Dear list,

 

I have the following problem:

 

I am implementing an application that forks and starts a child application with an "exec" command. I want the parent to catch the stdout and stderr messages of the child. Unfortunately, everything I do (pipes/sockets) works well only for stderr but not for stdout. Due to the buffering of stdout the messages don't arrive before the termination of the child. A manipultion of the buffer size (via setvbuf) gets overwritten by the execution of the child and I cannot access the child to flush the buffer.

 

I have discovered that ddd can indeed redirect stdout of the application to be debugged without any problems. I had a look at the source code but it's quite large...

So, does anybody know how ddd accomplishes this?

 

Thanks and cheers,

Jens


	
Verschicken Sie romantische, coole und witzige Bilder per SMS! 
Jetzt bei WEB.DE FreeMail: *http://f.web.de/?mc=021193* [http://f.web.de/?mc=021193]

_______________________________________________
Ddd mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/ddd
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.