Fix preprocessor piping. Found by SungAli, diagnosed by SungAli and Sei Lisa.

This commit is contained in:
Sei Lisa 2015-08-17 04:56:32 +02:00
parent cd9bfd426e
commit 6b2c5b7e39

10
main.py
View file

@ -469,14 +469,8 @@ def main():
stdout = ''
p = subprocess.Popen(preproc_cmdline, stdin=subprocess.PIPE,
stdout=subprocess.PIPE)
p.stdin.write(script)
p.stdin.close()
while True:
time.sleep(0.1)
status = p.poll()
stdout += p.stdout.read()
if status is not None:
break
stdout = p.communicate(input=script)[0]
status = p.wait()
if status:
return status
script = stdout