gurenyu@192:~/Documents/CodeLinux> ./Reapchild 4
This is the child 33325
This is the child 33326
This is the child 33327
This is the child 33328
Reaping the child 33325
Reaping the child 33326
Reaping the child 33327
Reaping the child 33328
gurenyu@192:~/Documents/CodeLinux>
若将kill()函数加入之后,回收函数reap()的打印不会再出现等待的过程,而是直接回收。