Lines Matching refs:tty
44 TEST_IMPL(tty) {
50 /* Make sure we have an FD that refers to a tty */
74 ttyin_fd = open("/dev/tty", O_RDONLY, 0);
76 fprintf(stderr, "Cannot open /dev/tty as read-only: %s\n", strerror(errno));
81 ttyout_fd = open("/dev/tty", O_WRONLY, 0);
83 fprintf(stderr, "Cannot open /dev/tty as write-only: %s\n", strerror(errno));
174 /* Make sure we have an FD that refers to a tty */
226 /* Make sure we have an FD that refers to a tty */
272 /* Make sure we have an FD that refers to a tty */
316 /* Make sure we have an FD that refers to a tty */
348 uv_tty_t tty;
357 ASSERT_EQ(UV_EINVAL, uv_tty_init(&loop, &tty, fd, 1));
360 ASSERT_EQ(UV_EINVAL, uv_tty_init(&loop, &tty, fd, 1));
367 ASSERT_EQ(UV_EINVAL, uv_tty_init(&loop, &tty, fd, 1));
374 ASSERT_EQ(UV_EINVAL, uv_tty_init(&loop, &tty, fd, 1));
378 fd = open("/dev/tty", O_RDWR);
380 ASSERT_OK(uv_tty_init(&loop, &tty, fd, 1));
382 ASSERT(uv_is_readable((uv_stream_t*) &tty));
383 ASSERT(uv_is_writable((uv_stream_t*) &tty));
384 uv_close((uv_handle_t*) &tty, NULL);
385 ASSERT(!uv_is_readable((uv_stream_t*) &tty));
386 ASSERT(!uv_is_writable((uv_stream_t*) &tty));
389 fd = open("/dev/tty", O_RDONLY);
400 fd = open("/dev/tty", O_WRONLY);