Skip to content
Commit 972ddf6d authored by Ryan Roberts's avatar Ryan Roberts
Browse files

utils: Fix bug where logging output would occasionally fail.



It turns out that when setting a file descriptor to nonblocking, if that
fd is stdin and connected to a tty, it also makes stdout nonblocking.
Which means that prints() would occasionally fail if the output buffer
was full.

Solve this by only making file descriptors temporarily nonblocking when
reading them. Since the application is single threaded, this means that
the bit is never set when subsequently doing a print.

Signed-off-by: Ryan Roberts's avatarRyan Roberts <ryan.roberts@arm.com>
parent 174154ea
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment