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

12345

/openbsd-current/regress/sys/kern/signal/sigio/
H A Dsigio_pipe.c29 int fds[2]; local
31 assert(pipe(fds) == 0);
32 return test_common_badpgid(fds[0]);
38 int fds[2]; local
40 assert(pipe(fds) == 0);
41 return test_common_badsession(fds[0]);
47 int fds[2]; local
49 assert(pipe(fds) == 0);
50 return test_common_cansigio(fds);
56 int fds[ local
65 int fds[2]; local
74 int fds[2]; local
[all...]
H A Dsigio_socket.c33 int fds[2]; local
35 assert(socketpair(AF_UNIX, SOCK_STREAM, 0, fds) == 0);
36 return test_common_badpgid(fds[0]);
42 int fds[2]; local
44 assert(socketpair(AF_UNIX, SOCK_STREAM, 0, fds) == 0);
45 return test_common_badsession(fds[0]);
51 int fds[2]; local
53 assert(socketpair(AF_UNIX, SOCK_STREAM, 0, fds) == 0);
54 return test_common_cansigio(fds);
60 int fds[ local
131 int fds[2]; local
140 int fds[2]; local
[all...]
H A Dsigio_common.c95 test_common_cansigio(int *fds) argument
104 flags = fcntl(fds[0], F_GETFL);
105 assert(fcntl(fds[0], F_SETFL, flags | O_ASYNC) == 0);
114 assert(read(fds[0], buf, 1) == 1);
124 assert(read(fds[0], buf, 1) == 1);
127 assert(fcntl(fds[0], F_SETOWN, ppid) == 0);
130 assert(write(fds[1], buf, 1) == 1);
136 assert(write(fds[1], buf, 1) == 1);
193 test_common_read(int *fds) argument
198 flags = fcntl(fds[
222 test_common_write(int *fds) argument
[all...]
H A Dutil.c107 int fds[2]; local
109 assert(socketpair(AF_UNIX, SOCK_STREAM, 0, fds) == 0);
115 close(fds[0]);
116 *psfd = fds[1];
119 close(fds[1]);
120 *psfd = fds[0];
/openbsd-current/gnu/usr.bin/gcc/gcc/testsuite/gcc.dg/cpp/
H A Dtr-warn6.c7 #define foo1(h) sdf "h3" fds "h" /* { dg-warning "macro argument \"h\" would be stringified" "traditional stringification" } */
8 #define foo2(h2) sdf "h2" fds "h3" /* { dg-warning "macro argument \"h2\" would be stringified" "traditional stringification" } */
9 #define foo3(h3) sdf "h2" fds "h3" /* { dg-warning "macro argument \"h3\" would be stringified" "traditional stringification" } */
10 #define foo4(h) sdf 'h3' fds 'h' /* { dg-warning "macro argument \"h\" would be stringified" "traditional stringification" } */
11 #define foo5(h2) sdf 'h2' fds 'h3' /* { dg-warning "macro argument \"h2\" would be stringified" "traditional stringification" } */
12 #define foo6(h3) sdf 'h2' fds 'h3' /* { dg-warning "macro argument \"h3\" would be stringified" "traditional stringification" } */
13 #define foo7(AA, hello, world, EEE) sdf "A B hello C,world,DhelloE F" fds EEE /* { dg-warning "macro argument \"hello\" would be stringified" "traditional stringification" } */
21 #define bar1(h) sdf "h3" fds "h"
22 #define bar2(h2) sdf "h2" fds "h3"
23 #define bar3(h3) sdf "h2" fds "h
[all...]
/openbsd-current/regress/sys/kern/poll/
H A Dpollnval.c27 struct pollfd fds[1]; local
32 fds[0].fd = 0;
33 fds[0].events = POLLIN | POLLHUP;
36 assert(poll(fds, 1, -1) == 1);
37 assert(fds[0].revents & POLLNVAL);
/openbsd-current/usr.sbin/radiusd/
H A Dimsg_subr.c38 struct pollfd fds[1]; local
41 fds[0].fd = ibuf->fd;
42 fds[0].events = POLLIN;
43 retval = poll(fds, 1, millisec);
48 if (retval > 0 && (fds[0].revents & POLLIN) != 0)
61 struct pollfd fds[1]; local
67 fds[0].fd = ibuf->fd;
68 fds[0].events = POLLOUT;
69 retval = poll(fds, 1, millisec);
74 if (retval > 0 && (fds[
[all...]
/openbsd-current/lib/libc/sys/
H A Dw_poll.c22 poll(struct pollfd *fds, nfds_t nfds, int timeout) argument
27 ret = HIDDEN(poll)(fds, nfds, timeout);
H A Dw_ppoll.c23 ppoll(struct pollfd *fds, nfds_t nfds, argument
36 ret = HIDDEN(ppoll)(fds, nfds, timeout, sigmask);
/openbsd-current/usr.bin/talk/
H A Dio.c57 struct pollfd fds[2]; local
75 fds[0].fd = fileno(stdin);
76 fds[0].events = POLLIN;
77 fds[1].fd = sockt;
78 fds[1].events = POLLIN;
81 nb = poll(fds, 2, A_LONG_TIME * 1000);
92 if (fds[1].revents & POLLIN) {
99 if (fds[0].revents & POLLIN) {
/openbsd-current/regress/sys/kern/fchdir/
H A Dfchdir.c20 int fds[2]; local
31 if (pipe(fds))
33 if (fchdir(fds[0]) == 0)
37 close(fds[0]);
38 close(fds[1]);
/openbsd-current/regress/sys/net/pf_print/
H A Dpf_print_test.c78 int fds[2]; local
90 if (pipe(fds) == -1)
95 close(fds[0]);
96 if (dup2(fds[1], 1) == -1)
98 close(fds[1]);
103 close(fds[1]);
104 if ((fpipe = fdopen(fds[0], "r")) == NULL)
/openbsd-current/gnu/usr.bin/perl/dist/IO/
H A Dpoll.c44 poll(struct pollfd *fds, unsigned long nfds, int timeout) argument
64 int events = fds[i].events;
65 int fd = fds[i].fd;
67 fds[i].revents = 0;
98 if((fstat(fds[i].fd,&buf) < 0) && (errno == EBADF)) {
99 FD_SET(fds[i].fd, &ifd);
111 int revents = (fds[i].events & POLL_EVENTS_MASK);
112 int fd = fds[i].fd;
130 if((fds[i].revents = revents) != 0)
/openbsd-current/usr.bin/make/
H A Dcmd_exec.c126 int fds[2]; /* Pipe streams */ local
139 if (pipe(fds) == -1) {
149 (void)close(fds[0]);
156 if (fds[1] != 1) {
157 (void)dup2(fds[1], 1);
158 (void)close(fds[1]);
170 (void)close(fds[1]);
177 cc = read(fds[0], grab, sizeof(grab));
183 (void)close(fds[0]);
/openbsd-current/regress/lib/libpthread/siginterrupt/
H A Dsiginterrupt.c21 int fds[2]; local
24 CHECKe(pipe(fds));
25 ASSERT(read(fds[0], &buf, 1) == -1);
/openbsd-current/regress/sys/kern/rlimit-file/
H A Drlim-file.c17 int lim, fd, fds[2]; local
30 if (pipe(fds) == 0)
/openbsd-current/sbin/dhclient/
H A Ddispatch.c87 struct pollfd fds[3]; local
124 * fds[0] == bpf socket for incoming packets
125 * fds[1] == routing socket for incoming RTM messages
126 * fds[2] == imsg socket to privileged process
128 fds[0].fd = ifi->bpffd;
129 fds[1].fd = routefd;
130 fds[2].fd = unpriv_ibuf->fd;
131 fds[0].events = fds[1].events = fds[
[all...]
/openbsd-current/usr.sbin/nsd/
H A Dpopen3.c13 static void close_pipe(int fds[2]) argument
15 if(fds[0] != -1) {
16 close(fds[0]);
17 fds[0] = -1;
19 if(fds[1] != -1) {
20 close(fds[1]);
21 fds[1] = -1;
H A Dnetio.c111 static struct pollfd fds[MAX_NETIO_FDS]; local
147 fds[numfd].fd = handler->fd;
148 fds[numfd].events = 0;
149 fds[numfd].revents = 0;
152 fds[numfd].events |= POLLIN;
155 fds[numfd].events |= POLLOUT;
193 rc = ppoll(fds, numfd, (have_timeout?&minimum_timeout:NULL), sigmask);
196 rc = poll(fds, numfd, (have_timeout?minimum_timeout.tv_sec*1000+
238 if ((fds[handler->pfd].revents & POLLIN)) {
241 if ((fds[handle
[all...]
/openbsd-current/gnu/lib/libreadline/examples/
H A Dexcallback.c97 fd_set fds; local
121 FD_ZERO(&fds);
122 FD_SET(fileno(stdin), &fds); local
124 if( select(fileno(stdin) + 1, &fds, NULL, NULL, NULL) < 0) {
129 if( FD_ISSET(fileno(stdin), &fds) ) {
/openbsd-current/usr.sbin/mopd/otherOS/
H A Dloop-linux2.c95 fd_set fds, listeners; local
121 FD_ZERO(&fds);
124 FD_SET(ii->fd, &fds);
130 listeners = fds;
H A Dloop.c131 fd_set fds, listeners; local
144 FD_ZERO(&fds);
147 FD_SET(ii->fd, &fds);
153 listeners = fds;
/openbsd-current/regress/lib/libpthread/restart/read/
H A Dread.c22 int fds[2]; local
25 CHECKe(pipe(fds));
26 ASSERT(read(fds[0], &buf, 1) == -1);
/openbsd-current/regress/lib/libpthread/restart/readv/
H A Dreadv.c24 int fds[2]; local
27 CHECKe(pipe(fds));
30 ASSERT(readv(fds[0], &iov, 1) == -1);
/openbsd-current/regress/lib/libc/sys/
H A Dt_pollts.c60 int fds[2]; local
65 ATF_REQUIRE_EQ(pipe(fds), 0);
67 pfds[0].fd = fds[0];
69 pfds[1].fd = fds[1];
106 ATF_REQUIRE_EQ(write(fds[1], "", 1), 1);
118 ATF_REQUIRE_EQ(close(fds[0]), 0);
119 ATF_REQUIRE_EQ(close(fds[1]), 0);

Completed in 534 milliseconds

12345