Lines Matching refs:fd
165 int fd = -1; /* file descriptor to return */
321 if ((fd = (*connfunc) (phostname, iagent, X_CONNECTION_RETRIES,
333 ioctl (fd, FIOSNBIO, &arg);
337 (void) fcntl (fd, F_SETFL, O_NONBLOCK);
339 (void) fcntl (fd, F_SETFL, FNDELAY);
341 (void) fcntl (fd, F_SETFL, O_NDELAY);
345 (void) fcntl (fd, F_SETFD, 1);
366 return fd;
373 if (fd >= 0) (void) close (fd);
430 int fd;
447 if ((fd = dnet_conn (phostname, objname, SOCK_STREAM, 0, 0, 0, 0)) < 0) {
456 (void) close (fd);
466 (void) close (fd);
470 return fd;
502 int fd; /* socket file descriptor */
515 if ((fd = socket ((int) addr->sa_family, SOCK_STREAM, 0)) < 0) {
520 setsockopt(fd, SOL_SOCKET, SO_SNDBUF, (char *) &gNXSndBufSize, sizeof(gNXSndBufSize));
522 if (connect (fd, addr, addrlen) < 0) {
524 (void) close (fd);
538 return fd;
559 int fd; /* file descriptor to return */
626 if ((fd = socket ((int) addr->sa_family, SOCK_STREAM, 0)) < 0) {
636 setsockopt (fd, IPPROTO_TCP, TCP_NODELAY, (char *)&tmp, sizeof (int));
640 len = setsockopt(fd, SOL_SOCKET, SO_SNDBUF, (char *) &gNXSndBufSize, sizeof(gNXSndBufSize));
646 if (connect (fd, addr, addrlen) < 0) {
648 (void) close (fd);
693 return fd;
733 BITSET(r_mask, dpy->fd);
734 BITSET(w_mask, dpy->fd);
737 nfound = select (dpy->fd + 1, (SELECT_TYPE) r_mask,
751 if (BytesReadable(dpy->fd, (char *) &pend_not_register) < 0)
790 BITSET(r_mask, dpy->fd);
791 result = select(dpy->fd + 1, (SELECT_TYPE) r_mask, (SELECT_TYPE) NULL,
835 (void) WritevToServer (dpy->fd, iovarray, niov);