●。 Example- TCPechod.C o The call to accept blocks the server thread until a connection arrives o Note the call to fork(: after the fork Master process needs to close the child socket o The new child process needs to close the master socket o Sockets only disappear in the processes not the system o Before system deallocates a socket, all the processes own the socket need to close it 19 SIE NTUT Taiwan19 CSIE, NTUT, Taiwan Example – TCPechod.c The call to accept blocks the server thread until a connection arrives Note the call to fork(): after the fork() ⚫ Master process needs to close the child socket ⚫ The new child process needs to close the master socket ⚫ Sockets only disappear in the processes not the system ⚫ Before system deallocates a socket, all the processes own the socket need to close it