socket's strange behavior with subprocesses

Irmen de Jong irmen at -NOSPAM-REMOVETHIS-xs4all.nl
Wed Nov 12 13:17:20 EST 2003


Jane Austine wrote:

> and the server side tries to close the socket:
> 
> #server side
> 
>>>>z[0].close()
>>>>#yes, it seems to have worked.
> 
> 
> Alas, the client side doesn't wake up! It doesn't wake up unless the
> notepad is exited first; only after that, 'Connection reset by peer'
> is raised. What does the socket has to do with subprocesses?

Nothing, I guess... try to shutdown the socket explicitly before closing it:


z[0].shutdown(2)
z[0].close()

does that work?

--Irmen





More information about the Python-list mailing list