import signal
import socket
import stat
+import subprocess
import sys
import tempfile
import textwrap
args = [portage.const.BASH_BINARY, "-c",
"cd %s && git diff-index --name-only --diff-filter=M HEAD" % \
portage._shell_quote(portdir)]
- import subprocess
proc = subprocess.Popen(args, stdout=subprocess.PIPE)
modified_files = set(_unicode_decode(l).rstrip("\n") for l in proc.stdout)
rval = proc.wait()
+ proc.stdout.close()
if rval != os.EX_OK:
return rval
os.path.join(PORTAGE_BIN_PATH, "repoman"), "full"],
cwd=cwd, env=env, stdout=subprocess.PIPE)
output = proc.stdout.readlines()
- if proc.wait() != os.EX_OK:
+ proc.wait()
+ proc.stdout.close()
+ if proc.returncode != os.EX_OK:
for line in output:
sys.stderr.write(_unicode_decode(line))
owner = plibs.pop(fields[1], None)
lines.append((owner, "scanelf", ";".join(fields)))
proc.wait()
+ proc.stdout.close()
if plibs:
# Preserved libraries that did not appear in the scanelf output.