Original Post
I''m using CreateProcess to execute another program, and I want to wait for that program to finish execution before continuing. So after calling CreateProcess I use WaitForSingleObject(blah, INFINITE). This works fine in most cases. The problem I''ve run into is sometimes the program I call executes others in turn but doesn''t wait for them to terminate. Is there some way I can tell Windows to wait for any process recursively spawned to terminate? MSDN and Google haven''t been much help.
I hope that''s clear.