There is a strange behaivour in the STDOUT of this program.
If I execute the program:
./steam -command update -game "Counter-Strike Source" -dir .
Outputs the next:
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
...
For any strange reason if I use a pipe and tee to log it into a file this way: ./steam -command update -game "Counter-Strike Source" -dir . | tee log
The only thing that outputs the program is:
Checking bootstrapper version ...
Updating Installation
Determining which depot(s) to install/update...
5 depot(s) will be installed/updated
And nothing more. The same text is in the log file and on the screen. Still the program starts updating the files. Any idea why is this happening?
Note: The lines that are missing are not from STDERR
Note2: ./steam doesnt create any children or extra processes
I’d guess the program is checking
isatty(3)to decide whether to display progress output. If that’s the case, then you probably wouldn’t get very sensible output if you did capture it to a file, because it’s probably using various control characters to make the output more human-friendly.You can try capturing the program’s output when it’s connected to a TTY by running: