socket.fromfd() documentation problem

Hello I was having a very nasty fd leak recently where I've leaked more than 200k FDs, allocating more than 1Gbytes of ram in kernel space. It was my fault alright, but I thought I'd mention it here so maybe you'll put a little NOTE section in the documentation mentioning that you have to os.close() the original FD to avoid leakage. Also I'm not completely clear why python does it this way and why not close the original socket - it seems (at least to me) that this would be the right(er) way. Nevertheless what are your thoughts on this? Should I file a bug report for it? (The best part was that the allocated FD memory did not show up as slab, so this was a real pain in the butt to hunt down) Kalman Gergely

Le mercredi 06 octobre 2010 09:34:05, Kálmán Gergely a écrit :
Nevertheless what are your thoughts on this? Should I file a bug report for it?
It will be fixed faster if you open an issue and attach a patch ;-) -- Victor Stinner http://www.haypocalc.com/

On 10/06/10 14:12, Victor Stinner wrote:
Le mercredi 06 octobre 2010 09:34:05, Kálmán Gergely a écrit :
Nevertheless what are your thoughts on this? Should I file a bug report for it?
It will be fixed faster if you open an issue and attach a patch ;-)
Just did: http://bugs.python.org/issue10099 Kalman Gergely
participants (2)
-
Kálmán Gergely
-
Victor Stinner