Path: utzoo!mnetor!uunet!husc6!bbn!fkittred From: fkittred@bbn.COM (Fletcher Kittredge) Newsgroups: comp.unix.wizards Subject: Re: AF_INET Stream Sockets & Server/Client Models Message-ID: <744@cc6.bbn.COM> Date: 12 Jan 88 13:20:06 GMT References: <573@usl-pc.UUCP> Reply-To: fkittred@cc6.bbn.com.BBN.COM (Fletcher Kittredge) Followup-To: fkittred@cc6.bbn.com Organization: Bolt Beranek and Newman Inc., Cambdridge MA Lines: 15 Keywords: socket, pipe, signal Summary: signal generated by broken socket connection [ how can you tell if one end of a socket connection has abnormally terminated?] On Ultrix (BSD 4.[23] type) systems, if a process which has an UNIX domain socket open dies (your client), the process on the other end of the socket (your server) will receive the signal EPIPE when the server attempts to write to the socket. Using the SO_KEEPALIVE socket option causes messages to be periodically transmitted on a socket to test the state of the socket. If you set your socket options correctly, when client doesn't respond to the keepalive messages, then the EPIPE signal should be generated for the server. You can catch this signal and do whatever. fletcher