/freebsd-10.1-release/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/io/ |
H A D | tst.fds.d | 35 raise(SIGUSR1); /* kick tst.fds.c out of its busy-wait loop */ 41 printf("fds[%d] fi_name = %s\n", arg0, fds[arg0].fi_name); 42 printf("fds[%d] fi_dirname = %s\n", arg0, fds[arg0].fi_dirname); 43 printf("fds[%d] fi_pathname = %s\n", arg0, fds[arg0].fi_pathname); 44 printf("fds[%d] fi_fs = %s\n", arg0, fds[arg0].fi_fs); 45 printf("fds[ [all...] |
H A D | tst.fds.c | 49 int i, n, fds[10]; local 76 * To test the fds[] array, we open /dev/null (a file with reliable 79 fds[n++] = open(file, O_RDONLY); 80 fds[n++] = open(file, O_WRONLY); 81 fds[n++] = open(file, O_RDWR); 83 fds[n++] = open(file, O_RDWR | O_APPEND | O_CREAT | O_DSYNC | 87 fds[n++] = open(file, O_RDWR); 88 (void) lseek(fds[n - 1], 123, SEEK_SET); 93 * our DTrace script into recording the content of the fds[] array. 96 (void) ioctl(fds[ [all...] |
/freebsd-10.1-release/crypto/openssh/openbsd-compat/regress/ |
H A D | closefromtest.c | 39 int i, max, fds[NUM_OPENS]; local 43 if ((fds[i] = open("/dev/null", O_RDONLY)) == -1) 48 closefrom(fds[max]); 49 if (close(fds[max]) != -1) 54 if (read(fds[i], buf, sizeof(buf)) == -1) 57 /* should close all fds */ 58 closefrom(fds[0]); 60 if (close(fds[i]) != -1)
|
/freebsd-10.1-release/crypto/heimdal/lib/roken/ |
H A D | mini_inetd.c | 94 rk_socket_t *fds; local 101 fds = malloc (nalloc * sizeof(*fds)); 102 if (fds == NULL) { 110 fds[i] = socket (a->ai_family, a->ai_socktype, a->ai_protocol); 111 if (rk_IS_BAD_SOCKET(fds[i])) 113 socket_set_reuseaddr (fds[i], 1); 114 socket_set_ipv6only(fds[i], 1); 115 if (rk_IS_SOCKET_ERROR(bind (fds[i], a->ai_addr, a->ai_addrlen))) { 117 rk_closesocket(fds[ [all...] |
/freebsd-10.1-release/lib/libkse/thread/ |
H A D | thr_poll.c | 47 int __poll(struct pollfd *fds, unsigned int nfds, int timeout); 52 __poll(struct pollfd *fds, unsigned int nfds, int timeout) argument 58 ret = __sys_poll(fds, nfds, timeout);
|
/freebsd-10.1-release/crypto/openssh/openbsd-compat/ |
H A D | bsd-poll.c | 43 poll(struct pollfd *fds, nfds_t nfds, int timeout) argument 52 fd = fds[i].fd; 71 fd = fds[i].fd; 74 if (fds[i].events & POLLIN) { 78 if (fds[i].events & POLLOUT) { 96 fd = fds[i].fd; 97 fds[i].revents = 0; 101 fds[i].revents |= POLLIN; 104 fds[i].revents |= POLLOUT; 107 fds[ [all...] |
/freebsd-10.1-release/contrib/libreadline/examples/ |
H A D | excallback.c | 100 fd_set fds; local 124 FD_ZERO(&fds); 125 FD_SET(fileno(stdin), &fds); local 127 if( select(FD_SETSIZE, &fds, NULL, NULL, NULL) < 0) { 132 if( FD_ISSET(fileno(stdin), &fds) ) {
|
/freebsd-10.1-release/tools/regression/file/ftruncate/ |
H A D | ftruncate.c | 62 int error, fd, fds[2], i, read_only_fd; local 155 if (pipe(fds) < 0) 157 if (ftruncate(fds[0], 0) == 0) 161 close(fds[0]); 162 close(fds[1]); 170 if (ftruncate(fds[0], 0) == 0)
|
/freebsd-10.1-release/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/privs/ |
H A D | tst.fds.ksh | 26 tmpin=/tmp/tst.fds.$$.d 27 tmpout1=/tmp/tst.fds.$$.out1 28 tmpout2=/tmp/tst.fds.$$.out2 33 printf("%d: field =fmt\n", fd, fds[fd].field);
|
/freebsd-10.1-release/contrib/ncurses/ncurses/tty/ |
H A D | lib_twait.c | 165 struct pollfd *fds = fd_list; local 205 fds = typeMalloc(struct pollfd, MIN_FDS + evl->count); 209 fds[count].fd = sp->_ifd; 210 fds[count].events = POLLIN; 215 fds[count].fd = fd; 216 fds[count].events = POLLIN; 226 fds[count].fd = ev->data.fev.fd; 227 fds[count].events = POLLIN; 234 result = poll(fds, (unsigned) count, milliseconds); 250 if (fds[ [all...] |
/freebsd-10.1-release/contrib/libarchive/libarchive/ |
H A D | filter_fork_posix.c | 202 struct pollfd fds[2]; local 207 fds[idx].fd = in; 208 fds[idx].events = POLLOUT; 212 fds[idx].fd = out; 213 fds[idx].events = POLLIN; 217 poll(fds, idx, -1); /* -1 == INFTIM, wait forever */
|
/freebsd-10.1-release/contrib/unbound/util/ |
H A D | mini_event.c | 111 base->fds = (struct event**)calloc((size_t)base->capfd, 113 if(!base->fds) { 205 if(!base->fds[i] || !(FD_ISSET(i, &base->ready))) { 216 bits &= base->fds[i]->ev_events; 219 base->fds[i]->ev_callback)); 220 (*base->fds[i]->ev_callback)(base->fds[i]->ev_fd, 221 bits, base->fds[i]->ev_arg); 266 if(base->fds) 267 free(base->fds); [all...] |
/freebsd-10.1-release/tools/regression/sockets/sblock/ |
H A D | sblock.c | 153 int error, fds[2], recver_fd, sender_fd; local 174 if (socketpair(PF_LOCAL, SOCK_STREAM, 0, fds) < 0) 177 sender_fd = fds[0]; 178 recver_fd = fds[1];
|
/freebsd-10.1-release/tools/tools/netrate/juggle/ |
H A D | juggle.c | 170 int fds[2]; local 172 if (pipe(fds) < 0) 175 *fd1p = fds[0]; 176 *fd2p = fds[1]; 184 int fds[2]; local 186 if (socketpair(PF_LOCAL, SOCK_DGRAM, 0, fds) < 0) 189 *fd1p = fds[0]; 190 *fd2p = fds[1]; 198 int fds[2]; local 200 if (socketpair(PF_LOCAL, SOCK_STREAM, 0, fds) < [all...] |
/freebsd-10.1-release/libexec/ftpd/ |
H A D | popen.c | 68 static int fds; variable 82 if ((fds = getdtablesize()) <= 0) 84 if ((pids = malloc(fds * sizeof(int))) == NULL) 86 memset(pids, 0, fds * sizeof(int));
|
/freebsd-10.1-release/usr.sbin/cron/cron/ |
H A D | popen.c | 55 static int fds; variable 83 if ((fds = getdtablesize()) <= 0) 85 if (!(pids = (PID_T *)malloc((u_int)(fds * sizeof(PID_T))))) 87 bzero((char *)pids, fds * sizeof(PID_T));
|
/freebsd-10.1-release/contrib/opie/ |
H A D | opieauto.c | 328 fd_set fds, rfds, efds; local 332 FD_ZERO(&fds); 333 FD_SET(parents, &fds); 336 memcpy(&rfds, &fds, sizeof(fd_set)); 347 FD_CLR(s[i], &fds); 353 FD_SET(parents, &fds); 373 FD_SET(s[i], &fds); 382 FD_CLR(parents, &fds);
|
/freebsd-10.1-release/contrib/tnftp/src/ |
H A D | util.c | 1464 ftp_poll(struct pollfd *fds, int nfds, int timeout) argument 1467 return poll(fds, nfds, timeout); 1483 if (fds[i].fd > FD_SETSIZE) { 1484 warnx("can't select fd %d", fds[i].fd); 1487 } else if (fds[i].fd > max) 1488 max = fds[i].fd; 1489 if (fds[i].events & rsetflags) 1490 FD_SET(fds[i].fd, &rset); 1491 if (fds[i].events & wsetflags) 1492 FD_SET(fds[ [all...] |
/freebsd-10.1-release/sbin/dhclient/ |
H A D | dispatch.c | 149 struct pollfd *fds; local 155 fds = malloc(nfds * sizeof(struct pollfd)); 156 if (fds == NULL) 197 fds[i].fd = l->fd; 198 fds[i].events = POLLIN; 199 fds[i].revents = 0; 208 count = poll(fds, nfds, to_msec); 226 if ((fds[i].revents & (POLLIN | POLLHUP))) { 227 fds[i].revents = 0;
|
/freebsd-10.1-release/tools/tools/netrate/netreceive/ |
H A D | netreceive.c | 104 struct pollfd fds; local 107 fds.fd = t->fd; 108 fds.events = POLLIN; 111 if (poll(&fds, 1, -1) < 0) 113 if (!(fds.revents & POLLIN))
|
/freebsd-10.1-release/contrib/ntp/libntp/ |
H A D | ntp_worker.c | 48 int fds[2]; local 52 rc = socketpair(AF_UNIX, SOCK_STREAM, 0, &fds[0]); 58 rc = pipe(&fds[0]); 67 caller_fds[0] = fds[0]; 68 caller_fds[1] = fds[1];
|
/freebsd-10.1-release/crypto/heimdal/appl/ftp/ftpd/ |
H A D | popen.c | 74 static int fds; variable 119 fds = getdtablesize(); 120 pids = (int*)calloc(fds, sizeof(int));
|
/freebsd-10.1-release/lib/libc/db/mpool/ |
H A D | mpool.libtp | 70 static int fds[NUM_FILE_ENTRIES]; 95 fds[i] = -1; 170 if ( fds[i] != -1 ) { 171 close ( fds[i] ); 546 if ( fds[fid] != -1 ) { 547 return(fds[fid]); 550 fds[fid] = open ( buf_strings+buf_fids[fid].offset, O_RDWR|O_CREAT, 552 if ( fds[fid] < 0 ) { 554 buf_strings+buf_fids[fid].offset, fid, fds[fid], 559 buf_strings+buf_fids[fid].offset, fid, fds[fi [all...] |
/freebsd-10.1-release/tools/tools/net80211/w00t/assoc/ |
H A D | assoc.c | 808 fd_set fds; local 810 FD_ZERO(&fds); 811 FD_SET(p.rx, &fds); 818 rc = select(p.rx+1, &fds, NULL, 891 fd_set fds; local 894 FD_ZERO(&fds); 895 FD_SET(p.rx, &fds); 896 FD_SET(p.tap, &fds); 899 max = select(max+1, &fds, NULL, NULL, NULL); 903 if (FD_ISSET(p.tap, &fds)) { [all...] |
/freebsd-10.1-release/contrib/amd/amd/ |
H A D | info_exec.c | 69 fd_set fds; local 114 FD_ZERO(&fds); 115 FD_SET(rdfd, &fds); 117 rval = select(rdfd+1, &fds, 0, 0, &timeo);
|