From cd33ae05e818e0b6161ef4c1a9eb368cae6db5f4 Mon Sep 17 00:00:00 2001 From: Torsten Werner Date: Wed, 2 Mar 2011 13:17:12 +0100 Subject: [PATCH] Reap zombie children in scan_contents(). Signed-off-by: Torsten Werner --- daklib/dbconn.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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') -- 2.39.5