Lines Matching refs:fd

62 #define isatty(fd) isreallyatty(fd)  argument
69 int uv__tcsetattr(int fd, int how, const struct termios *term) { in uv__tcsetattr() argument
73 rc = tcsetattr(fd, how, term); in uv__tcsetattr()
82 static int uv__tty_is_slave(const int fd) { in uv__tty_is_slave() argument
87 result = ioctl(fd, TIOCGPTN, &dummy) != 0; in uv__tty_is_slave()
91 result = ioctl(fd, TIOCPTYGNAME, &dummy) != 0; in uv__tty_is_slave()
116 if (uv__fstat(fd, &sb) != 0) in uv__tty_is_slave()
131 result = ptsname(fd) == NULL; in uv__tty_is_slave()
136 int uv_tty_init(uv_loop_t* loop, uv_tty_t* tty, int fd, int unused) { in uv_tty_init() argument
150 type = uv_guess_handle(fd); in uv_tty_init()
159 saved_flags = fcntl(fd, F_GETFL); in uv_tty_init()
182 if (uv__tty_is_slave(fd) && ttyname_r(fd, path, sizeof(path)) == 0) in uv_tty_init()
196 r = uv__dup2_cloexec(newfd, fd); in uv_tty_init()
206 fd = newfd; in uv_tty_init()
217 uv__nonblock(fd, 1); in uv_tty_init()
220 r = uv__stream_try_select((uv_stream_t*) tty, &fd); in uv_tty_init()
227 r = fcntl(fd, F_SETFL, saved_flags); in uv_tty_init()
238 uv__stream_open((uv_stream_t*) tty, fd, flags); in uv_tty_init()
284 int fd; in uv_tty_set_mode() local
290 fd = uv__stream_fd(tty); in uv_tty_set_mode()
293 rc = tcgetattr(fd, &tty->orig_termios); in uv_tty_set_mode()
306 orig_termios_fd = fd; in uv_tty_set_mode()
330 rc = uv__tcsetattr(fd, TCSADRAIN, &tmp); in uv_tty_set_mode()
340 int fd; in uv__tty_close() local
342 fd = handle->io_watcher.fd; in uv__tty_close()
343 if (fd == -1) in uv__tty_close()
351 if (fd == orig_termios_fd) { in uv__tty_close()
358 uv__tcsetattr(fd, TCSANOW, &orig_termios); in uv__tty_close()