[twill] file descriptors

Eli Carter eli.carter at commprove.com
Wed Aug 22 09:08:17 PDT 2007


All,

It appears that twill 0.9b1 is leaking file descriptors like mad:
Each call to twill.commands.go opens 3 or 4 new fds, and they are never 
closed.

(Also, http://twill.idyll.org/trac/ gives me a 404, so I can't file a bug.)

Anyone know what the cause is?

Eli

[1] Small script to demonstrate the problem on a Linux machine:
#!/usr/bin/python
import os
import twill
import glob
def fds():
    print len(glob.glob('/proc/%s/fd/*' % os.getpid()))
if __name__ == '__main__':
    url = 'http://www.google.com'
    fds()
    for i in range(8):
        twill.commands.go(url)
        fds()

[2] Output I'm getting:
$ PYTHONPATH=../twill-0.9b1 ./testfds.py 
4
==> at http://www.google.com
8
==> at http://www.google.com
11
==> at http://www.google.com
14
==> at http://www.google.com
18
==> at http://www.google.com
21
==> at http://www.google.com
25
==> at http://www.google.com
29
==> at http://www.google.com
33



More information about the twill mailing list