From: Torsten Werner Date: Wed, 2 Mar 2011 12:17:12 +0000 (+0100) Subject: Reap zombie children in scan_contents(). X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd33ae05e818e0b6161ef4c1a9eb368cae6db5f4;p=dak Reap zombie children in scan_contents(). Signed-off-by: Torsten Werner --- diff --git a/daklib/dbconn.py b/daklib/dbconn.py index 24f8fb17..04823061 100755 --- a/daklib/dbconn.py +++ b/daklib/dbconn.py @@ -512,9 +512,8 @@ class DBBinary(ORMObject): iso8859-1 encoding. ''' fullpath = self.poolfile.fullpath - debdata = Popen(['dpkg-deb', '--fsys-tarfile', fullpath], - stdout = PIPE).stdout - tar = TarFile.open(fileobj = debdata, mode = 'r|') + dpkg = Popen(['dpkg-deb', '--fsys-tarfile', fullpath], stdout = PIPE) + tar = TarFile.open(fileobj = dpkg.stdout, mode = 'r|') for member in tar.getmembers(): if member.isfile(): try: @@ -523,7 +522,8 @@ class DBBinary(ORMObject): name = member.name.decode('iso8859-1') yield normpath(name) tar.close() - debdata.close() + dpkg.stdout.close() + dpkg.wait() __all__.append('DBBinary')