Re: asking about pipe line
- From: Baby Lion <BabyLion.Liang@xxxxxxxxx>
- Date: Fri, 30 Nov 2007 02:12:06 -0800 (PST)
I found the answer from msdn
The parent process uses the other ends of the pipes to write to the
child process's input and read the child process's output. The handles
to these ends of the pipe are also inheritable. However, the handle
must not be inherited. Before creating the child process, the parent
process must use DuplicateHandle to create a duplicate of the
application-defined hChildStdinWr global variable that cannot be
inherited. It then uses CloseHandle to close the inheritable handle.
For more information, see Pipes.
thanks to Joseph : )
On 11月30日, 下午2时59分, Joseph M. Newcomer <newco....@xxxxxxxxxxxx> wrote:
Note that you will probably have to send an end-of-file to stdin, typically Ctrl+Z.
Otherwise, it continues to wait for input. I'm not sure what would happen if you closed
the SendToChild handle...it may or may not react well to a broken pipe.
Until the child process has read all the input, it cannot produce the sorted output.
joe
On Thu, 29 Nov 2007 19:35:26 -0800 (PST), Baby Lion <BabyLion.Li...@xxxxxxxxx> wrote:
it just wait to read from the child process ,but not to move on
y ?
thanks
Joseph M. Newcomer [MVP]
email: newco...@xxxxxxxxxxxx
Web:http://www.flounder.com
MVP Tips:http://www.flounder.com/mvp_tips.htm
.
- Follow-Ups:
- Re: asking about pipe line
- From: Baby Lion
- Re: asking about pipe line
- References:
- asking about pipe line
- From: Baby Lion
- Re: asking about pipe line
- From: Joseph M . Newcomer
- Re: asking about pipe line
- From: Baby Lion
- Re: asking about pipe line
- From: Baby Lion
- Re: asking about pipe line
- From: Joseph M . Newcomer
- asking about pipe line
- Prev by Date: Re: CDateTimeCtrl time format in resource
- Next by Date: Re: asking about pipe line
- Previous by thread: Re: asking about pipe line
- Next by thread: Re: asking about pipe line
- Index(es):
Relevant Pages
|
Loading