UNIX programming examples - Linux&C.
2) Handling lots of children. The parent loops forking. Each child does nothing and suddenly terminates. The parent cycles on waitpid to keep the exit statuses queue the shortest it can. Just put a "sleep(1);" into children to see a memory exhaustion or M...