This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients docs@python, ezio.melotti, giampaolo.rodola, gvanrossum, pitrou, sbt, serhiy.storchaka
Date 2012-12-31.14:11:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <201212311610.52216.storchaka@gmail.com>
In-reply-to <1356954052.43.0.633061110097.issue16802@psf.upfronthosting.co.za>
Content
> It has at least one potential use.  On Windows socket.detach() returns a
> socket handle but there is no documented way to close it -- os.close()
> will not work.  The only way to close it that I can see (without resorting
> to ctypes) is with something like
> 
>     socket.socket(fileno=handle).close()

There is an alternative (documented) interface:

    socket.fromfd(handle, socket.AF_INET, socket.SOCK_STREAM).close()
History
Date User Action Args
2012-12-31 14:11:18serhiy.storchakasetrecipients: + serhiy.storchaka, gvanrossum, pitrou, giampaolo.rodola, ezio.melotti, docs@python, sbt
2012-12-31 14:11:18serhiy.storchakalinkissue16802 messages
2012-12-31 14:11:18serhiy.storchakacreate