Subject: accept(2) and evanescent connections
To: None <tech-net@netbsd.org>
From: Castor Fu <castor@geocast.com>
List: tech-net
Date: 07/27/2000 09:43:08
On NetBSD right now, if I have a socket which is listening for connections
and someone sends me data and closes the connection, accept(2)
will return success, and reads will give me the residual data,
but the data in the sockaddr structure returned is garbage.

I haven't sorted out if the info for the sockaddr structure could
somehow be preserved.  In FreeBSD, the size of the sockaddr is set
to zero.

Any suggestions on what "The Right Thing" is?  If the data in the
socket is still hanging around, it seems like we should preserve the 
address info, too.  Otherwise, we should just return an error of some sort.

	-castor