<div dir="ltr"><div>Hello everyone:</div><div><br></div>After some searching, there seems to be two ways to kill exited child processes.<div>#1. use <b>signal()</b> catch SIGCHLD with <b>waitpid() .  </b>(or fork 2 times)</div>
<div>#2. terminate them by shell commands.</div><div><br></div><div>here is my question:</div><div>Which way does real world server do with this problem? </div><div>If it is #1, when to <b>signal() </b>the zombies<b> </b>? </div>
<div>(I assume that should be each time new process forked, it check whether SIGCHLD exist and then handle them)</div></div>