[ Team LiB ] Previous Section Next Section

Exercises

16.1

In our discussion of Figure 16.10, we mentioned that the parent must call shutdown, not close. Why?

16.2

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?

16.3

What happens in Figure 16.10 if the parent dies unexpectedly before the child, and the child then reads an EOF on the socket?

16.4

What happens in Figure 16.11 if we remove the two lines


if (n == 0)
    goto done;     /* connect completed immediately */
16.5

In Section 16.3 we said that it is possible for data to arrive for a socket before connect returns. How can this happen?


    [ Team LiB ] Previous Section Next Section