◐ Shell
clean mode source ↗

Message 79882 - Python tracker

On Windows, if you exit a process abnormally (using e.g. os._exit() in 
Python) while it still has open connections, the other side receives a 
WSAECONNRESET (error 10054).

So, you could write a test case using a dumb server (running as another 
process) with a very short, predefined sequence of recv/send calls, 
ending abruptly with os._exit().

On Linux I *think* you would get ECONNRESET, and at least some form of 
error on other OS's.