Too many open files

Ulrich Eckhardt eckhardt at satorlaser.com
Mon Feb 9 08:17:21 EST 2009


psaffrey at googlemail.com wrote:
> I'm building a pipeline involving a number of shell tools. In each
> case, I create a temporary file using tempfile.mkstmp() and invoke a
> command ("cmd < /tmp/tmpfile") on it using subprocess.Popen.
> 
> At the end of each section, I call close() on the file handles and use
> os.remove() to delete them. Even so I build up file descriptors that
> eventually give me the "too many files" error message. Am I missing
> something here?

There recently was a bug filed at bugs.python.org about leaked file
descriptors. Maybe that is exactly what you are experiencing here.

Uli

-- 
Sator Laser GmbH
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932




More information about the Python-list mailing list