http://qs1969.pair.com?node_id=530476


in reply to Re^2: Reaping Zombies
in thread Reaping Zombies

It seems to be expensive it terms of CPU usage

What do you mean exactly? have you found the waitpid system call to be expensive, or are you talking about the full process?

What else are you doing inside the while loop besides calling the reaper? You should be calling sleep or select or any other thing that causes your program to do nothing for a while!