added mechanism to handle zombie processes