diff --git a/src/unix/core.c b/src/unix/core.c index 61c6f22c..58d12987 100644 --- a/src/unix/core.c +++ b/src/unix/core.c @@ -79,6 +79,7 @@ void uv_close(uv_handle_t* handle, uv_close_cb close_cb) { uv_pipe_cleanup((uv_pipe_t*)handle); /* Fall through. */ + case UV_TTY: case UV_TCP: stream = (uv_stream_t*)handle; @@ -231,6 +232,7 @@ void uv__finish_close(uv_handle_t* handle) { case UV_NAMED_PIPE: case UV_TCP: + case UV_TTY: assert(!ev_is_active(&((uv_stream_t*)handle)->read_watcher)); assert(!ev_is_active(&((uv_stream_t*)handle)->write_watcher)); assert(((uv_stream_t*)handle)->fd == -1); diff --git a/src/unix/stream.c b/src/unix/stream.c index 12c7173c..be34df10 100644 --- a/src/unix/stream.c +++ b/src/unix/stream.c @@ -679,8 +679,9 @@ int uv_write(uv_write_t* req, uv_stream_t* stream, uv_buf_t bufs[], int bufcnt, uv_write_cb cb) { int empty_queue; - assert((stream->type == UV_TCP || stream->type == UV_NAMED_PIPE) - && "uv_write (unix) does not yet support other types of streams"); + assert((stream->type == UV_TCP || stream->type == UV_NAMED_PIPE || + stream->type == UV_TTY) && + "uv_write (unix) does not yet support other types of streams"); if (stream->fd < 0) { uv_err_new(stream->loop, EBADF);