Lines Matching refs:fd

369 	int fd;
413 if (clnt_control(pdomb->dom_client, CLGET_FD, (char *)&fd))
414 (void) fcntl(fd, F_SETFD, 1); /* make it "close on exec" */
431 int fd;
436 fd = t_open(nconf->nc_device, O_RDWR, NULL);
437 if (fd == -1)
440 if (netdir_options(nconf, ND_SET_RESERVEDPORT, fd, NULL) == -1) {
441 if (t_bind(fd, NULL, NULL) == -1) {
442 (void) t_close(fd);
446 return (fd);
469 int fd;
483 fd = tli_open_rsvdport(pdomb->dom_binding->ypbind_nconf);
484 if (fd < 0) {
490 pdomb->dom_client = clnt_tli_create(fd,
966 int fd;
1009 if ((fd = t_open(nconf->nc_device, O_RDWR, NULL)) == -1) {
1014 if (t_bind(fd, NULL, NULL) == -1) {
1017 (void) t_close(fd);
1023 if (t_connect(fd, &sndcall, NULL) == -1) {
1026 (void) t_close(fd);
1034 cl = clnt_tli_create(fd, nconf, nas->n_addrs,
1038 (void) t_close(fd);
1050 (void) t_close(fd);
1072 * The fd should be closed while destroying the handle.
1082 int fd;
1086 fd = open(uaddress, O_RDONLY);
1087 if (fd == -1)
1091 st = lockf(fd, F_TEST, 1);
1093 (void) close(fd);
1097 st = read(fd, uaddress, ulen);
1099 (void) close(fd);
1103 (void) close(fd);
1148 int fd;
1151 fd = open(filename, O_RDONLY);
1152 if (fd == -1) {
1159 st = lockf(fd, F_TEST, 1);
1161 (void) close(fd);
1165 (void) close(fd);
1172 int fd;
1175 if (clnt_control(pdomb->dom_client, CLGET_FD, (char *)&fd) != TRUE ||
1176 fstat(fd, &stbuf) == -1) {
1178 pdomb->fd = -1;
1181 pdomb->fd = fd;
1190 if (pdomb->fd == -1)
1193 if (fstat(pdomb->fd, &stbuf) == -1) {
1194 syslog(LOG_DEBUG, "yp_bind client: can't stat %d", pdomb->fd);
1202 "yp_bind client: fd %d changed, old=0x%x, new=0x%x",
1203 pdomb->fd, pdomb->rdev, stbuf.st_rdev);
1208 return (1); /* fd is okay */