mirror of
https://github.com/openssl/openssl.git
synced 2024-12-18 06:23:58 +08:00
UI_OpenSSL()'s session opener fails on MacOS X
If on a non-tty stdin, TTY_get() will fail with errno == ENODEV. We didn't catch that. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2039)
This commit is contained in:
parent
4984448648
commit
c901bccec6
@ -428,6 +428,15 @@ static int open_console(UI *ui)
|
||||
if (errno == EINVAL)
|
||||
is_a_tty = 0;
|
||||
else
|
||||
# endif
|
||||
# ifdef ENODEV
|
||||
/*
|
||||
* MacOS X returns ENODEV (Operation not supported by device),
|
||||
* which seems appropriate.
|
||||
*/
|
||||
if (errno == ENODEV)
|
||||
is_a_tty = 0;
|
||||
else
|
||||
# endif
|
||||
{
|
||||
char tmp_num[10];
|
||||
|
Loading…
Reference in New Issue
Block a user