[fpc-pascal]No wait execution and redirection of stdin and stdout

XHajT03 at mbox.vol.cz XHajT03 at mbox.vol.cz
Wed Aug 28 21:19:10 CEST 2002

From:           	"Peter H.M. Brooks" <peter at new.co.za>
To:             	<fpc-pascal at deadlock.et.tudelft.nl>
Subject:        	Re: [fpc-pascal]No wait execution and redirection of 
stdin and stdout
Date sent:      	Tue, 27 Aug 2002 22:52:01 +0200
Organization:   	Psyche Trading Company
Send reply to:  	fpc-pascal at deadlock.et.tudelft.nl

> No, I'm not talking about the really primitive one - I mean the
> Windoze based ones - XP, 2000 and so forth.

 Well, it's a different story then. ;-) XP and 2000 aren't DOS based 
at all.

> > > - Firstly I'd like to launch a program with no wait and then check
> > > for its completion later.

 Windows isn't quite my domain, but... You should probably use 
function CreateProcess which is used in unit Dos (see the Win32 
implementation of this unit), I guess.

> > > - Secondly, when launching a program I'd like to redirect its
> > > stdin and stdout equivalents so that I can write to it and read
> > > from it while it is executing - clearly I need to be able to do
> > > the above first!

 See unit Redir (/tests/utils/redir.pp in CVS) - you'll find how to 
redirect standard handles there. However, using pipes and/or messages 
instead of files might be more appropriate for interprocess 
communication under Windows. In addition, if you'll be author of both 
parts (i.e. the master program and its child), you might want to use 
threads instead of applications under Windows.

> > > - I'd also like to be able to send signals to programs that I have
> > > launched to terminate them or establish their current state.

 I can't really help here. You should probably consult this with some 
Win32 API documenation (e.g. that one which is available from Borland 


More information about the fpc-pascal mailing list