Skip to content

Comments

use stderr for error messages and for ncurses ui#176

Open
JCoMcL wants to merge 1 commit intoclbr:masterfrom
JCoMcL:use-stderr
Open

use stderr for error messages and for ncurses ui#176
JCoMcL wants to merge 1 commit intoclbr:masterfrom
JCoMcL:use-stderr

Conversation

@JCoMcL
Copy link

@JCoMcL JCoMcL commented Jan 20, 2026

I tried writing a shell script which parses the output of radeontop -d - and found that I had to filter out the first two lines

Unknown Radeon card. <= R500 won't work, new cards might.
Dumping to -, line limit 1.

Printing metadata like this to stderr for humans to see while and reserving stdout for the actual data makes piping a lot easier. Despite the name, stderr isn't just errors, it's generally for anything intended for humans and not meaningful in shell scripts. That also includes the ncurses UI, which typically uses stderr.
These changes should make no difference in normal cases but be a lot more predictable in specific cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant