[fpc-pascal] Redirecting input to a child process

Marco van de Voort marcov at stack.nl
Sun May 8 18:06:03 CEST 2011

In our previous episode, Anton Shepelev said:
> > > shell, isn't the shell's input redirected to the
> > > program's?
> >
> > Maybe. I'm pretty sure about batchfiles, but never
> > tried programs, that's why I thought  I'd  mention
> > the observation.
> My program captures both the standard and error out-
> put of batchfiles and progams called therefrom  just
> the  same way as with regular programs run using the
> shell.
> So you don't see any evident errors?

I played a bit with it, but was unable to make it work. I added a writeln of
outstream.size to the "running" while, and it seems output is written.

It seems the program somehow doesn't get the signal to close. (since I can
see more.com is still running in the taskmgr)

More information about the fpc-pascal mailing list