找回密码
 注册
查看: 478|回复: 1

怎么判断一个子进程中止了

[复制链接]
发表于 2004-10-17 22:02:58 | 显示全部楼层 |阅读模式
即怎么样的情况,子进程才会发一个SIGCHLD信号给他的父进程阿?
发表于 2004-10-19 12:05:10 | 显示全部楼层
sigchld is sent by the OS, not the child process. Imagine that you kill -9 child, the child will not be able to do anything before being killed. then the parent will not be able to know the child has died. This, however isn't true. The parent can always use wait to check whether the child has died.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2025-2-12 01:15 , Processed in 0.038831 second(s), 16 queries .

© 2001-2025 Discuz! Team. Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表