以下の私の python スクリプトのスニペットでは、temp2 は temp の実行が完了するのを待たず、出力が大きくなる可能性がありますが、単なるテキストです。これにより、temp から結果 ('out') が切り捨てられ、行の途中で停止します。temp からの「out」は、temp 2 が追加されるまで正常に機能します。time.wait() と subprocess.Popen.wait(temp) を追加してみました。これらは両方とも、「out」が切り捨てられないように temp を最後まで実行できるようにしますが、「out2」がないように連鎖プロセスを中断します。何か案は?
temp = subprocess.Popen(call, stdout=subprocess.PIPE)
#time.wait(1)
#subprocess.Popen.wait(temp)
temp2 = subprocess.Popen(call2, stdin=temp.stdout, stdout=subprocess.PIPE)
out, err = temp.communicate()
out2, err2 = temp2.communicate()