In our discussion of Figure 16.10, we mentioned that the parent must call shutdown, not close. Why?
What happens in Figure 16.10 if the server process terminates prematurely, plus the child receives the EOF and terminates, but the child does not notify the parent?
What happens in Figure 16.10 if the parent dies unexpectedly before the child, and the child then reads an EOF on the socket?
What happens in Figure 16.11 if we remove the two lines
if (n == 0)
goto done; /* connect completed immediately */
In Section 16.3 we said that it is possible for data to arrive for a socket before connect returns. How can this happen?