From fc9e66e555f8520b14a2f25335f4e03b349f70a3 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Wed, 11 Mar 2015 16:05:56 +0100 Subject: unix: reject non-tty fds in uv_tty_init() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reject file descriptors that correspond to regular files or char/block devices. Such file descriptors are incompatible with epoll and trigger a run-time assert. Fixes: https://github.com/libuv/libuv/issues/255 PR-URL: https://github.com/libuv/libuv/pull/259 Reviewed-By: Saúl Ibarra Corretgé --- docs/src/tty.rst | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'docs/src') diff --git a/docs/src/tty.rst b/docs/src/tty.rst index c7845429..18f34ef4 100644 --- a/docs/src/tty.rst +++ b/docs/src/tty.rst @@ -66,6 +66,10 @@ API If opening ``/dev/tty`` fails, libuv falls back to blocking writes for non-readable TTY streams. + .. versionchanged:: 1.5.0: trying to initialize a TTY stream with a file + descriptor that refers to a file returns `UV_EINVAL` + on UNIX. + .. c:function:: int uv_tty_set_mode(uv_tty_t*, uv_tty_mode_t mode) .. versionchanged:: 1.2.0: the mode is specified as a -- cgit v1.2.3