a crucial close() to prevent too-many-open-files

--HG--
branch : trunk
This commit is contained in:
holger krekel 2010-05-18 21:25:20 +02:00
parent cf255cd643
commit f552749de6
1 changed files with 1 additions and 0 deletions

View File

@ -58,6 +58,7 @@ class FDCapture:
if self.targetfd == 0 and not self.tmpfile:
fd = os.open(devnullpath, os.O_RDONLY)
os.dup2(fd, 0)
os.close(fd)
if hasattr(self, '_oldsys'):
setattr(sys, patchsysdict[self.targetfd], DontReadFromInput())
else: