in reply to Re: Reaping Zombiesin thread Reaping Zombies
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!
I've only just added the multi-threaded processing and the script was using a lot of CPU. With the reaper code, it running at 20-30% CPU usage...eesh
DejaVu Sans Mono
Droid Sans Mono
Envy Code R
Source Code Pro
The default, whatever it is
Results (19 votes). Check out past polls.