0b9acb24a4
Using subprocess.PIPE and Popen.wait() causes the child process to block in case of write (stdout) buffer full. Rewrite the whole function to use simple a simple fd via mkstemp(). This way, even if the env variable is very long, the process won't hang. This issue has been observed in dev-texlive/texlive-latexextra-2012's SRC_URI, which is more than 131k chars long!