[fpc-pascal] Redirecting input to a child process

Anton Shepelev anton.txt at gmail.com
Wed May 18 21:23:20 CEST 2011


A little update on the subject.

Ludo Brands wrote:

> If  you  run  'more'  in  a  cmd window you'll notice that
> 'more' echoes the input but only sends to  stdout  when  a
> return   is  entered.  I  modified  the  program  to  send
> 'Anton'#10 and the program reads back 'Anton'#10 from std-
> out.

After  fixing an error in my WinApi program, it is no longer
needed to terminate input with #10. Now that  the  write-end
of  the  child  process's  input handle is correctly closed,
more.com echoes whatever has been written to it requiring no
additional terminal symbols.

Anton



More information about the fpc-pascal mailing list