Does close() on socket on one end, closes on the other end as well?
问题 If ESTABLISHED socket (after connecting from client via connect() ), exits and thus kernel closes all open file descriptor, what happens to the other side? If the client sends FIN and the server ACK it (which is just half-closed state), but the server tries to read() on that socket, what happen then? I can imagine 2 situation: the socket server read() s on, is closed also. But in the server side there is no exit(), so noone has closed that socket at that side. So here I do not know how server