[fpc-pascal] TProcess.Terminate leaves all children

Michael Van Canneyt michael.vancanneyt at wisa.be
Wed Dec 6 09:45:52 CET 2006



On Tue, 5 Dec 2006, Sverrir Valgeirsson wrote:

> Hi.
> I am using the TProcess class in an application I'm writing on Windows 2000,
> and I've noticed that it only kills the actual process it points to when the
> Terminate() method is called, and leaves all children of that process running.
> 
> Is there any (simple) way to kill the entire process tree of the TProcess?

No. Windows provides no functionality for this, as far as I know. I checked
on MSDN, but see no such functionality.

You'll have to manually walk the tree and kill all processes in it.

Michael.



More information about the fpc-pascal mailing list