tty fixes for unix
This commit is contained in:
parent
c1374ba587
commit
2ef8f359ee
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user