等待子进程退出的问题
时间:2011-11-24
来源:互联网
CreateProcess创建子进程,WaitForSingleObject等待子进程退出,都没问题
现在情况是子进程可能又启动了其他进程,我需要等所有子进程退出后WaitForSingleObject才返回,该怎么处理?
现在情况是子进程可能又启动了其他进程,我需要等所有子进程退出后WaitForSingleObject才返回,该怎么处理?
作者: aqtata 发布时间: 2011-11-24
遍历进程快照?
作者: funxu 发布时间: 2011-11-25
让子进程也WaitForSingleObject等待它的子进程退出
作者: lhylhy 发布时间: 2011-11-25
道理一样吧,子进程也要用WaitForSingleObject等待子子进程初始化结束
作者: kaikai_kk 发布时间: 2011-11-25
最标准的方法:使用作业(Job)对象。
http://msdn.microsoft.com/en-us/library/windows/desktop/ms684161(v=vs.85).aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/ms684847(v=vs.85).aspx#job_object_functions
Windows系统中使用“作业”来管理一组相关进程。A job object allows groups of processes to be managed as a unit. Job objects are namable, securable, shareable objects that control attributes of the processes associated with them. Operations performed on a job object affect all processes associated with the job object. Examples include enforcing limits such as working set size and process priority or terminating all processes associated with a job.
http://msdn.microsoft.com/en-us/library/windows/desktop/ms684161(v=vs.85).aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/ms684847(v=vs.85).aspx#job_object_functions
Windows系统中使用“作业”来管理一组相关进程。A job object allows groups of processes to be managed as a unit. Job objects are namable, securable, shareable objects that control attributes of the processes associated with them. Operations performed on a job object affect all processes associated with the job object. Examples include enforcing limits such as working set size and process priority or terminating all processes associated with a job.
作者: JPEXE 发布时间: 2011-11-25
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28