Tuesday, 22 May 2012

My program does not respond when two subprocess read from stdin

I have a C program that need some control information during its runtime. These information will be passed by my python program. I first test this, it works fine. from subprocess import PIPE import subprocess cpro = ['./a_pass','2','8','7'] #2,8,7 are some parameters for init p1 = subprocess.Popen(cpro,stdout=PIPE, stdin=PIPE) #p2 = subprocess.Popen(cpro,stdout=PIPE, stdin=PIPE) f1 =

No comments:

Post a Comment