Lines Matching refs:fd
22 * give the name of a tty fd. threadsafe.
23 * @param fd the tty to get the name from.
29 ttyname_r(int fd, char *buffer, size_t bufferSize)
34 if (fstat(fd, &fdStat) < 0)
37 if (!S_ISCHR(fdStat.st_mode) || !isatty(fd))
41 if (ioctl(fd, B_GET_PATH_FOR_DEVICE, buffer, bufferSize) < 0)
48 * give the name of a tty fd.
49 * @param fd the tty to get the name from.
53 ttyname(int fd)
57 int err = ttyname_r(fd, pathname, sizeof(pathname));