Fix preprocessor piping. Found by SungAli, diagnosed by SungAli and Sei Lisa.
This commit is contained in:
10
main.py
10
main.py
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user