Reidrect stderr of child process
- From: "Schemer" <nowhere@xxxxxxx>
- Date: Wed, 21 May 2008 14:56:25 -0400
I have inherited the maintenance of a client app and the associated server.
Simply, the server waits for the client to trigger it; when triggered, the
server runs a child proces, and sends output back to the client.
I an having trouble re-directiong the output from the server to the client.
I found this in the server code:
// The steps for redirecting child process's STDERR:
// 1. Save current STDERR, to be restored later.
// 2. Create anonymous pipe to be STDERR for child process.
// 3. Set STDERR of the parent to be the read handle to the
// pipe, so it is inherited by the child process.
// 4. Create a noninheritable duplicate of the write handle,
// and close the inheritable write handle.
Does that make sense? Is it true for stdout as well as stderr?
When the client triggers the server, it looks like stdout is re-directed,
but not stderr.
Thanks for any help.
.
- Follow-Ups:
- Re: Reidrect stderr of child process
- From: Schemer
- Re: Reidrect stderr of child process
- Prev by Date: Re: How to Find Reg Key for the particular N/W Adapter in a Machine
- Next by Date: Re: How to Find Reg Key for the particular N/W Adapter in a Machine
- Previous by thread: How about Threads and IOCP Efficient Design,other IOCP per thread?
- Next by thread: Re: Reidrect stderr of child process
- Index(es):
Relevant Pages
|
Loading