[entropy.tools] read_elf_broken_symbols: do not block when stdio buffers are full

This commit is contained in:
Fabio Erculiani
2014-04-03 12:19:33 +02:00
parent b8ee50d514
commit 85c262ff90
+4 -3
View File
@@ -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