Mailing List Archive

pinentry: minor annoyances with --help
This is concerning pinentry 0.7.1. For some reason, the output of
pinentry-foo --help goes to stderr, not stdout. This is inconsistent
with just about every other program out there. (Try ls, gpg.) If you
think about it, if I request help, printing the help information is not
an error.

Also, I sometimes get this, but only with the Qt version:

$ pinentry-qt --version/--help
Xlib: extension "GLX" missing on display ":0.0".
Xlib: extension "GLX" missing on display ":0.0".
[real information follows...]

I think it should be possible to get clean help output without having a
properly(?) configured X, so maybe the initialization of the Xlib stuff
can be moved somewhere after the help handling code.

Thanks.
Re: pinentry: minor annoyances with --help [ In reply to ]
On Thu, 22 Jul 2004 20:28:39 +0200, Peter Eisentraut said:

> This is concerning pinentry 0.7.1. For some reason, the output of
> pinentry-foo --help goes to stderr, not stdout. This is inconsistent

Thanks for reporting. I just fixed it in the CVS.

> $ pinentry-qt --version/--help
> Xlib: extension "GLX" missing on display ":0.0".
> Xlib: extension "GLX" missing on display ":0.0".
> [real information follows...]

That is the usual way of doing thing. Some options are to be passed
to the GUI and the usual way to handle this is by letting the GUI init
fucntion remove the args from the array and then continue with the
application's option parsing. The advantage is that the GUI lib may
add new GUI options to all applications without the need to change the
applications proper.

Adding an extra hook to parse "--help" is theoretically possible but
not good style. Anyway the Xlibn error stuff should go to stderr and
--help and ---version go to stdout.

Thanks,

Werner