*BSD News Article 28043


Return to BSD News archive

Xref: sserve comp.unix.programmer:15478 comp.unix.bsd:13520
Newsgroups: comp.unix.programmer,comp.unix.bsd
Path: sserve!newshost.anu.edu.au!munnari.oz.au!bruce.cs.monash.edu.au!harbinger.cc.monash.edu.au!yeshua.marcam.com!zip.eecs.umich.edu!newsxfer.itd.umich.edu!gatech!usenet.ins.cwru.edu!howland.reston.ans.net!cs.utexas.edu!uunet!swissbank!root
From: leed@il.us.swissbank.com (Dwight Lee)
Subject: Detecting dead client in BSD socket
Message-ID: <1994Mar3.154852.24090@il.us.swissbank.com>
Keywords: socket bsd death
Sender: root@il.us.swissbank.com (Operator)
Nntp-Posting-Host: black_costello
Organization: Swiss Bank Corporation CM&T Division
Date: Thu, 3 Mar 1994 15:48:52 GMT
Lines: 10

Is there a way to determine, from the server side, whether a client has
closed its end of the connection in a BSD socket?  If the server attempts
a write to the dead client, SIGPIPE is received, and that works if
communication is steady and regular, but I'm wondering if there's a way
to determine client death/closure at an arbitrary moment.

If this is a FAQ, feel free to refer me to it, or any in-print books for
that matter.

Thank you.