Notifying parent process to resume working
I'm creating a child process and loading a 3rd-party program.
After loading, the child process is doing some IO operations that I have no control on.In a perfect world, the child process would finish his magic-IO-mambo开发者_如何学Python-jumbo and the parent process will initialize a unit that depends on a successful magic.
How can I make sure that the magic has finished happening and I can load up that unit?
By the way, I'm using C/C++.
You're looking for some kind of interprocess communication. This is going to be os-specific, although there are more compatible wrappers like boost.interprocess. In particular, you're going to want some sort of synchronization mechanism: http://www.boost.org/doc/libs/1_47_0/doc/html/interprocess/synchronization_mechanisms.html
精彩评论