提交 c901bcce 编写于 作者: R Richard Levitte

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: NRich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2039)
上级 49844486
......@@ -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];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册