crypto/ui/ui_openssl.c: make sure to recognise ENXIO and EIO too
These both indicate that the file descriptor we're trying to use as a terminal isn't, in fact, a terminal. Fixes #7271 Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> (Merged from https://github.com/openssl/openssl/pull/7272)
This commit is contained in:
parent
2340ed277b
commit
276bf8620c
1 changed files with 18 additions and 0 deletions
|
@ -415,6 +415,24 @@ static int open_console(UI *ui)
|
||||||
is_a_tty = 0;
|
is_a_tty = 0;
|
||||||
else
|
else
|
||||||
# endif
|
# endif
|
||||||
|
# ifdef ENXIO
|
||||||
|
/*
|
||||||
|
* Solaris can return ENXIO.
|
||||||
|
* This should be ok
|
||||||
|
*/
|
||||||
|
if (errno == ENXIO)
|
||||||
|
is_a_tty = 0;
|
||||||
|
else
|
||||||
|
# endif
|
||||||
|
# ifdef EIO
|
||||||
|
/*
|
||||||
|
* Linux can return EIO.
|
||||||
|
* This should be ok
|
||||||
|
*/
|
||||||
|
if (errno == EIO)
|
||||||
|
is_a_tty = 0;
|
||||||
|
else
|
||||||
|
# endif
|
||||||
# ifdef ENODEV
|
# ifdef ENODEV
|
||||||
/*
|
/*
|
||||||
* MacOS X returns ENODEV (Operation not supported by device),
|
* MacOS X returns ENODEV (Operation not supported by device),
|
||||||
|
|
Loading…
Reference in a new issue