Searched refs:fds (Results 1 - 25 of 115) sorted by relevance

12345

/freebsd-10-stable/cddl/usr.sbin/dtrace/tests/common/io/
H A DMakefile8 tst.fds.d \
9 tst.fds.d.out \
15 tst.fds.c \
/freebsd-10-stable/contrib/netbsd-tests/kernel/
H A Dmsg.h45 msg_open(struct msg_fds *fds) argument
47 if (pipe(fds->pfd) == -1)
49 if (pipe(fds->cfd) == -1) {
50 close(fds->pfd[0]);
51 close(fds->pfd[1]);
58 msg_close(struct msg_fds *fds) argument
60 CLOSEFD(fds->pfd[0]);
61 CLOSEFD(fds->pfd[1]);
62 CLOSEFD(fds->cfd[0]);
63 CLOSEFD(fds
67 msg_write_child(const char *info, struct msg_fds *fds, void *msg, size_t len) argument
85 msg_write_parent(const char *info, struct msg_fds *fds, void *msg, size_t len) argument
103 msg_read_parent(const char *info, struct msg_fds *fds, void *msg, size_t len) argument
121 msg_read_child(const char *info, struct msg_fds *fds, void *msg, size_t len) argument
[all...]
/freebsd-10-stable/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/io/
H A Dtst.fds.d35 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 Dtst.fds.c51 int i, n, fds[10]; local
78 * To test the fds[] array, we open /dev/null (a file with reliable
81 fds[n++] = open(file, O_RDONLY);
82 fds[n++] = open(file, O_WRONLY);
83 fds[n++] = open(file, O_RDWR);
85 fds[n++] = open(file, O_RDWR | O_APPEND | O_CREAT |
88 fds[n++] = open(file, O_RDWR);
89 (void) lseek(fds[n - 1], 123, SEEK_SET);
94 * our DTrace script into recording the content of the fds[] array.
97 (void) ioctl(fds[
[all...]
/freebsd-10-stable/crypto/openssh/openbsd-compat/regress/
H A Dclosefromtest.c39 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-stable/contrib/netbsd-tests/kernel/kqueue/write/
H A Dt_pipe.c59 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-stable/crypto/heimdal/lib/roken/
H A Dmini_inetd.c94 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-stable/lib/libnv/
H A Dmsgio.h44 int fd_send(int sock, const int *fds, size_t nfds);
45 int fd_recv(int sock, int *fds, size_t nfds);
H A Dmsgio.c108 fd_set fds; local
112 FD_ZERO(&fds);
113 FD_SET(fd, &fds);
114 (void)select(fd + 1, doread ? &fds : NULL, doread ? NULL : &fds,
240 fd_package_send(int sock, const int *fds, size_t nfds) argument
250 PJDLOG_ASSERT(fds != NULL);
273 if (msghdr_add_fd(cmsg, fds[i]) == -1)
289 fd_package_recv(int sock, int *fds, size_t nfds) argument
300 PJDLOG_ASSERT(fds !
357 fd_recv(int sock, int *fds, size_t nfds) argument
389 fd_send(int sock, const int *fds, size_t nfds) argument
[all...]
/freebsd-10-stable/lib/libkse/thread/
H A Dthr_poll.c47 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-stable/crypto/openssh/openbsd-compat/
H A Dbsd-poll.c43 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-stable/contrib/libreadline/examples/
H A Dexcallback.c100 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-stable/contrib/netbsd-tests/kernel/kqueue/read/
H A Dt_pipe.c55 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));
76 RL(n = read(fds[0], buffer, event[0].data));
/freebsd-10-stable/cddl/usr.sbin/dtrace/tests/common/privs/
H A DMakefile8 tst.fds.ksh \
/freebsd-10-stable/usr.bin/whois/
H A Dwhois.c289 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-stable/tests/sys/file/
H A Dftruncate_test.c62 int error, fd, fds[2], i, read_only_fd; local
154 if (pipe(fds) < 0)
156 if (ftruncate(fds[0], 0) == 0)
160 close(fds[0]);
161 close(fds[1]);
169 if (ftruncate(fds[0], 0) == 0)
/freebsd-10-stable/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/privs/
H A Dtst.fds.ksh26 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-stable/sys/sys/
H A Dnvlist_impl.h42 nvlist_t *nvlist_xunpack(const void *buf, size_t size, const int *fds,
/freebsd-10-stable/contrib/netbsd-tests/lib/librumphijack/
H A Dh_client.c74 fd_set fds; local
81 FD_ZERO(&fds);
83 rv = select(100, &fds, &fds, &fds, &tv);
/freebsd-10-stable/contrib/ncurses/ncurses/tty/
H A Dlib_twait.c165 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-stable/contrib/netbsd-tests/lib/libc/sys/
H A Dt_poll.c158 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 Dt_write.c111 int fds[2]; local
113 ATF_REQUIRE(pipe(fds) == 0);
116 ATF_REQUIRE(write(fds[1], "x", 1) != -1);
117 ATF_REQUIRE(close(fds[0]) == 0);
122 if (write(fds[1], "x", 1) != -1 || errno != EPIPE)
125 ATF_REQUIRE(close(fds[1]) == 0);
/freebsd-10-stable/contrib/libarchive/libarchive/
H A Dfilter_fork_posix.c204 struct pollfd fds[2]; local
209 fds[idx].fd = in;
210 fds[idx].events = POLLOUT;
214 fds[idx].fd = out;
215 fds[idx].events = POLLIN;
219 poll(fds, idx, -1); /* -1 == INFTIM, wait forever */
/freebsd-10-stable/contrib/unbound/util/
H A Dmini_event.c111 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-stable/tools/regression/sockets/sblock/
H A Dsblock.c153 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];

Completed in 152 milliseconds

12345