Lines Matching refs:fd
47 int fd;
53 if ((fd = socket(AF_UNIX, SOCK_STREAM | SOCK_NONBLOCK, 0)) == -1) {
62 close(fd);
69 close(fd);
81 if (bind(fd, (struct sockaddr *)&sun, sizeof(sun)) == -1) {
83 close(fd);
91 close(fd);
96 cs->cs_fd = fd;
171 event_set(&c->iev.ev, c->iev.ibuf.fd, c->iev.events,
179 control_connbyfd(int fd)
184 if (c->iev.ibuf.fd == fd)
192 control_close(int fd, struct control_sock *cs)
196 if ((c = control_connbyfd(fd)) == NULL) {
197 log_warn("%s: fd %d not found", __func__, fd);
205 close(c->iev.ibuf.fd);
217 control_dispatch_imsg(int fd, short event, void *arg)
228 if ((c = control_connbyfd(fd)) == NULL) {
229 log_warn("%s: fd %d not found", __func__, fd);
236 control_close(fd, cs);
243 control_close(fd, cs);
250 control_close(fd, cs);
261 control_close(fd, cs);