-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rtl_433 -h or rtl_433 -R help prints to stderr instead stdout #2542
Comments
By piping messages for the user to stderr, the "real" output can stay with stdout, allowing it do be piped ( | ) easily into another program for further processing. |
Printing the output of -h/-R to stderr is a bug. When the user asks for it, it belongs on stdout and the program should exit with status 0. When it is printed because of bad or missing aguments on the command line, it should go to stderr and the program should exit with a non-zero status. |
Help to stdout might be expected, I see one doing |
As I understand the norms, if it is printed because of an error, leading to non-zero exit, stderr is appropriate. If it is printed because the user asked for it to be printed, and this does not lead to non-zero exit, stdout is appropriate. If the user asks for help output and something else, then either:
|
The trouble here is that we'd need to fit the chain of print functions with an additional flag where it should go. Not great. But basically we could change all those print functions to be something more like fprint and take the fd as first arg. |
hello,
i found that the help page(s) of rtl_433 prints to stderr by default.
is this intentional ?
normally tools print to stdout what's not considered an error
The text was updated successfully, but these errors were encountered: