Lines Matching defs:fd
125 int fd;
126 fd = open("/dev/null", O_RDWR);
127 dup2(fd, 0);
128 dup2(fd, 1);
129 dup2(fd, 2);
130 close(fd);
135 int fd;
136 if ((fd = open(console_name, O_RDWR)) < 0) {
137 fd = open("/dev/null", O_RDWR);
139 ioctl(fd, TIOCSCTTY, 0);
140 dup2(fd, 0);
141 dup2(fd, 1);
142 dup2(fd, 2);
143 close(fd);
146 static void publish_socket(const char *name, int fd)
154 snprintf(val, sizeof(val), "%d", fd);
158 fcntl(fd, F_SETFD, 0);
243 int fd, sz;
262 get_property_workspace(&fd, &sz);
263 sprintf(tmp, "%d,%d", dup(fd), sz);
575 int fd;
583 fd = open(console_name, O_RDWR);
584 if (fd >= 0)
586 close(fd);
589 fd = open("/dev/tty0", O_WRONLY);
590 if (fd >= 0) {
607 write(fd, msg, strlen(msg));
608 close(fd);
968 ufds[fd_count].fd = get_property_set_fd();
975 ufds[fd_count].fd = get_signal_fd();
982 ufds[fd_count].fd = get_keychord_fd();
1015 if (ufds[i].fd == get_property_set_fd())
1017 else if (ufds[i].fd == get_keychord_fd())
1019 else if (ufds[i].fd == get_signal_fd())