/freebsd-10.2-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.2-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.2-release/contrib/netbsd-tests/kernel/kqueue/write/ |
H A D | t_pipe.c | 59 int fds[2]; local 62 RL(pipe(fds)); 64 RL(close(fds[0])); 66 EV_SET(&event[0], fds[1], EVFILT_WRITE, EV_ADD|EV_ENABLE, 0, 0, 0); 83 int fds[2]; local 88 RL(pipe(fds)); 91 EV_SET(&event[0], fds[1], EVFILT_WRITE, EV_ADD|EV_ENABLE, 0, 0, 0); 97 int sz = read(fds[0], buffer, 128); 108 RL(n = write(fds[1], "foo", 3)); 109 RL(close(fds[ 124 int fds[2]; local [all...] |
/freebsd-10.2-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.2-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.2-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.2-release/contrib/netbsd-tests/kernel/kqueue/read/ |
H A D | t_pipe.c | 55 int fds[2]; local 58 RL(pipe(fds)); 61 EV_SET(&event[0], fds[0], EVFILT_READ, EV_ADD|EV_ENABLE, 0, 0, 0); 65 RL(write(fds[1], "foo", 3)); 72 RL(n = read(fds[0], buffer, event[0].data));
|
/freebsd-10.2-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.2-release/usr.bin/whois/ |
H A D | whois.c | 289 struct pollfd *fds; local 296 fds = calloc(count, sizeof(*fds)); 297 if (fds == NULL) 313 fds[i].fd = s; 314 fds[i].events = POLLERR | POLLHUP | 349 n = poll(fds, i, timeout); 373 if (fds[j].fd == -1 || fds[j].events == 0 || 374 fds[ [all...] |
/freebsd-10.2-release/tests/sys/file/ |
H A D | ftruncate_test.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.2-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.2-release/contrib/netbsd-tests/lib/librumphijack/ |
H A D | h_client.c | 74 fd_set fds; local 81 FD_ZERO(&fds); 83 rv = select(100, &fds, &fds, &fds, &tv);
|
/freebsd-10.2-release/contrib/netbsd-tests/lib/libc/sys/ |
H A D | t_poll.c | 158 int fds[2]; local 162 ATF_REQUIRE_EQ(pipe(fds), 0); 164 pfds[0].fd = fds[0]; 166 pfds[1].fd = fds[1]; 199 ATF_REQUIRE_EQ(write(fds[1], "", 1), 1); 211 ATF_REQUIRE_EQ(close(fds[0]), 0); 212 ATF_REQUIRE_EQ(close(fds[1]), 0); 247 int fds[2]; local 252 ATF_REQUIRE_EQ(pipe(fds), 0); 254 pfds[0].fd = fds[ [all...] |
H A D | t_write.c | 121 int fds[2]; local 123 ATF_REQUIRE(pipe(fds) == 0); 126 ATF_REQUIRE(write(fds[1], "x", 1) != -1); 127 ATF_REQUIRE(close(fds[0]) == 0); 132 if (write(fds[1], "x", 1) != -1 || errno != EPIPE) 135 ATF_REQUIRE(close(fds[1]) == 0);
|
/freebsd-10.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-release/contrib/netbsd-tests/lib/libcurses/director/ |
H A D | testlang_parse.y | 724 struct pollfd fds[2]; 753 fds[0].fd = check_fd; 754 fds[0].events = POLLIN; 755 fds[1].fd = master; 756 fds[1].events = POLLIN; 767 while (poll(fds, nfd, 500) == nfd) { 768 if (fds[0].revents & POLLIN) { 787 if (fds[0].revents & POLLIN) { 824 if ((result = poll(&fds[0], 2, 0)) != 0) { 828 if ((fds[ [all...] |