Thanks man, I thought that the -1 in the waitpid call would wait for "all" child processes to end. Now its clearer why this is happening. I understand connecting the reaper subroutine to the child , but how would I make it so that I would know that exactly 10 processes have ended ??
p.s I have never used signal handlers before
Waris