Path: utzoo!utgpu!water!watmath!clyde!rutgers!gatech!hao!oddjob!matt From: matt@oddjob.UChicago.EDU (Java Man) Newsgroups: comp.unix.wizards Subject: Re: AF_INET Stream Sockets & Server/Client Models Message-ID: <14228@oddjob.UChicago.EDU> Date: 14 Jan 88 20:07:56 GMT References: <573@usl-pc.UUCP> Organization: Morse Science High School Lines: 14 In article <573@usl-pc.UUCP> jpdres14@usl-pc.UUCP (Collett Donald L) writes: ) ... The user running the ) client program suddenly types control-C or the client program dies ) for some unknown reason. How does the server detect that the ) client is dead? When the client exits the kernel closes all its fd's. Since you say you are now conversant with select(), you can discover a dead client as follows. When select() indicates the fd is readable but read() returns 0 bytes, the socket has been closed. ________________________________________________________ Matt University matt@oddjob.uchicago.edu Crawford of Chicago {astrovax,ihnp4}!oddjob!matt