From c03d42607e3c9b0deb1042309afb6b0145135e1e Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Tue, 20 Sep 2011 14:59:26 -0700 Subject: [PATCH] More tty on unix fixes --- src/unix/stream.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/unix/stream.c b/src/unix/stream.c index be34df10..3983ca23 100644 --- a/src/unix/stream.c +++ b/src/unix/stream.c @@ -529,8 +529,8 @@ int uv_shutdown(uv_shutdown_t* req, uv_stream_t* stream, uv_shutdown_cb cb) { void uv__stream_io(EV_P_ ev_io* watcher, int revents) { uv_stream_t* stream = watcher->data; - assert(stream->type == UV_TCP || - stream->type == UV_NAMED_PIPE); + assert(stream->type == UV_TCP || stream->type == UV_NAMED_PIPE || + stream->type == UV_TTY); assert(watcher == &stream->read_watcher || watcher == &stream->write_watcher); assert(!(stream->flags & UV_CLOSING)); @@ -738,7 +738,8 @@ int uv_write(uv_write_t* req, uv_stream_t* stream, uv_buf_t bufs[], int bufcnt, int uv_read_start(uv_stream_t* stream, uv_alloc_cb alloc_cb, uv_read_cb read_cb) { - assert(stream->type == UV_TCP || stream->type == UV_NAMED_PIPE); + assert(stream->type == UV_TCP || stream->type == UV_NAMED_PIPE || + stream->type == UV_TTY); if (stream->flags & UV_CLOSING) { uv_err_new(stream->loop, EINVAL);