diff --git a/src/unix/tty.c b/src/unix/tty.c index 2385911c..ff7d3b17 100644 --- a/src/unix/tty.c +++ b/src/unix/tty.c @@ -139,7 +139,7 @@ int uv_tty_init(uv_loop_t* loop, uv_tty_t* tty, int fd, int unused) { * slave device. */ if (uv__tty_is_slave(fd) && ttyname_r(fd, path, sizeof(path)) == 0) - r = uv__open_cloexec(path, mode); + r = uv__open_cloexec(path, mode | O_NOCTTY); else r = -1;