Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Controlling a child's child process

Status
Not open for further replies.

Tve

Programmer
May 22, 2000
166
FR
Hi,

I have a problem related to child(ren) process control. It seems I always seem to have these kind of problems in windows....

I need to call an executable several times: let's call it "program.exe". I need to wait till the program.exe has finisihed it's work
before calling it again, and again, .....

The problem is that program.exe launches an other program "sub-program.exe" and "program.exe" does not wait till "sub-program.exe"
has finished it's job, so the control is returned to perl before "sub-program.exe" has finished processing.

I've tried $Process-Wait(INFINITE), but this has no sense since I am then waiting for "program.exe" and not "sub-program.exe" to end.

I really don't know how to handle this. I would basically like to wait till a program and all it's children have finished their work.

I thought of try to get the PID of the children, but I don't know how to do this.

Can anybody give me a tip?

Thanks,

Thierry
AD AUGUSTA PER ANGUSTA

Thierry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top