From 85c262ff90477ec95d7d49633fe747542deb60df Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Thu, 3 Apr 2014 12:19:33 +0200 Subject: [PATCH] [entropy.tools] read_elf_broken_symbols: do not block when stdio buffers are full --- lib/entropy/tools.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/entropy/tools.py b/lib/entropy/tools.py index d944fa9e2..899cd214e 100644 --- a/lib/entropy/tools.py +++ b/lib/entropy/tools.py @@ -2783,9 +2783,6 @@ def read_elf_broken_symbols(elf_file): proc = subprocess.Popen( args, stdout = subprocess.PIPE, stderr = subprocess.PIPE) - exit_st = proc.wait() - if exit_st != 0: - raise FileNotFound("ldd error") out = const_convert_to_unicode("") while True: @@ -2798,6 +2795,10 @@ def read_elf_broken_symbols(elf_file): if not tout: break + exit_st = proc.wait() + if exit_st != 0: + raise FileNotFound("ldd error") + except (OSError, IOError) as err: if err.errno != errno.ENOENT: raise