开发者

Notifying parent process to resume working

开发者 https://www.devze.com 2023-04-12 19:09 出处:网络
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.

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号