
syswrite on closed socket?
Quote:
> my server program hangs when trying to syswrite on closed socket.
I suspect this is untrue.
Quote:
> client usally send message before terminate so that server can delete
> client from client list. but when client terminate abnormally, server
> doesn't recognize and hangs when syswrite to this client.
You are not talking out a closed socket. You are talking about a
socket the peer of which is closed.
I suspect you are wrong about this anyhow. I suspect that the client
has forked (or has been created by forking) since the socket was
opened and that the branch of the fork is holding the socket open.
Quote:
> how do I overcome this problem?
If I've guessed right, close unwanted file handles after forking.
--
\\ ( )
. _\\__[oo
. l___\\
# ll l\\
###LL LL\\