diff options
-rw-r--r-- | Lib/ctypes/util.py | 8 | ||||
-rw-r--r-- | Misc/NEWS | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py index 794b895aa0..1bd2d70fd3 100644 --- a/Lib/ctypes/util.py +++ b/Lib/ctypes/util.py @@ -219,8 +219,12 @@ elif os.name == "posix": # XXX assuming GLIBC's ldconfig (with option -p) expr = r'(\S+)\s+\((%s(?:, OS ABI:[^\)]*)?)\)[^/]*(/[^\(\)\s]*lib%s\.[^\(\)\s]*)' \ % (abi_type, re.escape(name)) - res = re.search(expr, - os.popen('/sbin/ldconfig -p 2>/dev/null').read()) + f = os.popen('/sbin/ldconfig -p 2>/dev/null') + try: + data = f.read() + finally: + f.close() + res = re.search(expr, data) if not res: return None return res.group(1) @@ -21,6 +21,8 @@ Core and Builtins Library ------- +- Issue #6882: Import uuid creates zombies processes. + - Issue #6635: Fix profiler printing usage message. - Issue #6888: pdb's alias command was broken when no arguments were given. |