我需要编写一个C程序来检查其他程序的输出.它应该基本上像这样工作:
./otherprogram|./myprogram
但我找不到如何从stdout(或管道)逐行读取.然后将所有这些写入stdout.
c stdout pipe
c ×1
pipe ×1
stdout ×1