so... my program shell executes another (not mine) program which in turn opens a third program and then exits itself...

now i only have program 1 and 3 open... no 2

how do I make 1 kill 3 without any knowlegde of 2 or 3 beforehand... i.e. 2 is a generic launcher, three is a generic launchee, and what precise programs they are can change without notice.

??

the most generic form of what i'm looking to do is to kill all processes that occur as a result of program 1... even if some of those processes have already terminated.

any ideas?