 solution but it has a significant overhead when handling a
    big number of children (O(n) each time SIGCHLD is raised)
    c