通知父进程恢复工作
我正在创建一个子进程并加载第 3 方程序。
加载后,子进程正在执行一些我无法控制的IO操作。
在完美的世界中,子进程将完成他的 magic-IO-mambo-jumbo,父进程将初始化一个依赖于成功魔法的单元。
我怎样才能确保魔法已经完成并且我可以加载该单元?
顺便说一句,我正在使用 C/C++。
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-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++.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您正在寻找某种进程间通信。尽管有更多兼容的包装器(例如 boost.interprocess),但这将是特定于操作系统的。特别是,您需要某种同步机制: http://www.boost.org/doc/libs/1_47_0/doc/html/interprocess/synchronization_mechanisms.html
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