Reputation: 10950
Suppose I have a pre-fork server. On start up, the server listens on a socket and forks multiple children. All children then block on their accept()
system call until a client sends a request, upon which one of the children will handle the request. It is easy for the parent to detect the death of its children by using a SIGCHLD handler. But how can the children be informed about the death of their parent? All the children are blocking on their accept()
call, so they would not be able to poll for the presence/absence of the parent.
Upvotes: 0
Views: 27