[fpc-pascal] Redirecting input to a child process

SteveG steveg at nevets.com.au
Sun May 8 11:30:32 CEST 2011

On 08/05/11 17:30, Anton Shepelev wrote:
> SteveG:
>> Anton - I have attached an extract from some work-
>> ing code (hopefully I didnt remove anything neces-
>> sary)
>> It may help you move on a bit further
> I turned your piece of code into a complete program,
> but it didn't work either. In  fact,  there  is  not
> much  difference  between  your  program  and  mine,
> except that in generality.
> But I am creating a process with redirected standard
> handles (poUsePipes) and am sending a tiny five-byte
> input to it, and expecitng a tiny output, so there's
> no  need  in the loop and in the various checks that
> your program has.
> Also, your program does not call CloseInput(), which
> makes  me  wonder  how  the  process  can  ever end,
> because that way it is not going to  get  a  EOF  or
> error 109  ("Pipe  has  been ended") on its standard
> input.
> What OS is the code you sent me working on?

This is working on Linux and WinXP
I cut what I was hoping was just the relevant code from the unit, so it 
is missing a bit :)

More information about the fpc-pascal mailing list