When I write/send to a (TCP/IP) socket the writing thread (and process)
crashes if the receiving system crashes. So if the receiving system
receiving sockets are not closed correctly (I think). But this may not
be a reason
for the sender to crash.
The process crashes when it sends to a socket that the sender 'sees'
still as correct
but has a corresponding receive socket that is not correct anymore due
to a crash of
the receiving process. After the crash of the receiver, it is always the
(write) to the socket that lets sender crash.
Is there a solution for the problem? I think the send() or write()
function should return
with -1 instead of letting the system crash.
Thanks in advance,