|
From: | Jens Ahrens |
Subject: | How does ddd redirect stdout? |
Date: | Mon, 29 May 2006 17:18:19 +0200 |
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
|
[Prev in Thread] | Current Thread | [Next in Thread] |