Lines Matching refs:fd
117 int fd;
123 int fd;
128 fd = open("/dev/__properties__", O_RDWR | O_CREAT, 0600);
129 if (fd < 0)
132 if (ftruncate(fd, size) < 0)
135 data = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
139 close(fd);
141 fd = open("/dev/__properties__", O_RDONLY);
142 if (fd < 0)
149 w->fd = fd;
153 close(fd);
179 fcntl(pa_workspace.fd, F_SETFD, FD_CLOEXEC);
325 int fd, length;
329 fd = open(tempPath, O_WRONLY|O_CREAT|O_TRUNC, 0600);
330 if (fd < 0) {
334 write(fd, value, strlen(value));
335 close(fd);
484 void get_property_workspace(int *fd, int *sz)
486 *fd = pa_workspace.fd;
536 int fd, length;
548 fd = open(path, O_RDONLY);
549 if (fd >= 0) {
550 length = read(fd, value, sizeof(value) - 1);
557 close(fd);
609 int fd;
617 fd = create_socket(PROP_SERVICE_NAME, SOCK_STREAM, 0666, 0, 0);
618 if(fd < 0) return;
619 fcntl(fd, F_SETFD, FD_CLOEXEC);
620 fcntl(fd, F_SETFL, O_NONBLOCK);
622 listen(fd, 8);
623 property_set_fd = fd;