ext/libuv/src/unix/tty.c in libuv-2.0.6 vs ext/libuv/src/unix/tty.c in libuv-2.0.8

- old
+ new

@@ -183,11 +183,16 @@ } int uv_tty_get_winsize(uv_tty_t* tty, int* width, int* height) { struct winsize ws; + int err; - if (ioctl(uv__stream_fd(tty), TIOCGWINSZ, &ws)) + do + err = ioctl(uv__stream_fd(tty), TIOCGWINSZ, &ws); + while (err == -1 && errno == EINTR); + + if (err == -1) return -errno; *width = ws.ws_col; *height = ws.ws_row;