该程序的 STDOUT 中有一个奇怪的行为。
如果我执行程序:
./steam -command update -game "Counter-Strike Source" -dir .
输出下一个:
Checking bootstrapper version ...
Updating Installation
Determining which depot(s) to install/update...
5 depot(s) will be installed/updated
0:02 Checking local files and building download list for depot 242 'Counter-Strike Source Shared' version 129
0:02 Connecting content server session for version 129
0:03 [80.239.194.162:27030] Connecting...
0:06 [80.239.194.162:27030] Failed. Failed to connect to 80.239.194.162:27030, errno 115 "Operation now in progress"
0:06 [81.171.68.195:27030] Connecting...
0:07 [81.171.68.195:27030] Connection established; handshaking...
0:08 [81.171.68.195:27030] Sending login message...
0:08 Fetching version 129 manifest
...
如果我使用管道和 tee 以这种方式将其记录到文件中,出于任何奇怪的原因:./steam -command update -game "Counter-Strike Source" -dir . | tee log
输出程序的唯一内容是:
Checking bootstrapper version ...
Updating Installation
Determining which depot(s) to install/update...
5 depot(s) will be installed/updated
仅此而已。相同的文本在日志文件和屏幕上。程序仍然开始更新文件。知道为什么会这样吗?
注意:缺少的行不是来自 STDERR
注2:./steam 不会创建任何子进程或额外进程