diff options
author | Saúl Ibarra Corretgé <saghul@gmail.com> | 2015-08-05 21:17:46 +0200 |
---|---|---|
committer | thefourtheye <thechargingvolcano@gmail.com> | 2015-09-02 03:16:47 -0400 |
commit | a1615949a591fc523048a09540a2d340ff1b3da8 (patch) | |
tree | 1cc576ea6104f1baf8f92c6a82f3ca2b45afaccd /deps/uv/src/unix/tty.c | |
parent | e3740e452402892c1ce03bbbb4807e34f31558ad (diff) | |
download | android-node-v8-a1615949a591fc523048a09540a2d340ff1b3da8.tar.gz android-node-v8-a1615949a591fc523048a09540a2d340ff1b3da8.tar.bz2 android-node-v8-a1615949a591fc523048a09540a2d340ff1b3da8.zip |
deps: upgrade libuv to 1.7.3
PR-URL: https://github.com/nodejs/node/pull/2310
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: cjihrig - Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'deps/uv/src/unix/tty.c')
-rw-r--r-- | deps/uv/src/unix/tty.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/deps/uv/src/unix/tty.c b/deps/uv/src/unix/tty.c index 7783548a6e..54c9055a08 100644 --- a/deps/uv/src/unix/tty.c +++ b/deps/uv/src/unix/tty.c @@ -51,8 +51,6 @@ int uv_tty_init(uv_loop_t* loop, uv_tty_t* tty, int fd, int readable) { flags = 0; newfd = -1; - uv__stream_init(loop, (uv_stream_t*) tty, UV_TTY); - /* Reopen the file descriptor when it refers to a tty. This lets us put the * tty in non-blocking mode without affecting other processes that share it * with us. @@ -89,11 +87,18 @@ int uv_tty_init(uv_loop_t* loop, uv_tty_t* tty, int fd, int readable) { } skip: + uv__stream_init(loop, (uv_stream_t*) tty, UV_TTY); + + /* If anything fails beyond this point we need to remove the handle from + * the handle queue, since it was added by uv__handle_init in uv_stream_init. + */ + #if defined(__APPLE__) r = uv__stream_try_select((uv_stream_t*) tty, &fd); if (r) { if (newfd != -1) uv__close(newfd); + QUEUE_REMOVE(&tty->handle_queue); return r; } #endif |