curses: Return better error codes for bad ttynames
* pinentry/pinentry-curses.c (dialog_create): Return better error codes.
With this change the error message is now
$ MYTTY=$(tty) $ echo getpin | env -i pinentry-curses -d --ttyname "$MYTTY" OK Pleased to meet you pinentry-curses: no LC_CTYPE known - assuming UTF-8 ERR 83886383 Required environment variable not set <Pinentry>
Note that with the current released libgcrypt an unknown error code
will be printed.
- GnuPG-bug-id: T2452
- Signed-off-by: Werner Koch <wk@gnupg.org>