- 论坛徽章:
- 1
|
原帖由 isnowran 于 2006-9-18 13:13 发表
POSIX规定不能忽略SIGCHLD
哦,看来你的知识库得更新了。
POSIX.1-1990 disallowed setting the action for SIGCHLD to SIG_IGN. POSIX.1-2001 allows this possibility, so that ignoring SIGCHLD can be used to
prevent the creation of zombies (see wait(2)). Nevertheless, the historical BSD and System V behaviours for ignoring SIGCHLD differ, so that the
only completely portable method of ensuring that terminated children do not become zombies is to catch the SIGCHLD signal and perform a wait(2) or
similar. |
|