Searched refs:fds (Results 1 - 25 of 180) sorted by path

12345678

/freebsd-current/bin/pax/
H A Dar_io.c1238 int fds[2]; local
1241 if (pipe(fds) < 0)
1250 dup2(fds[1], fd);
1252 dup2(fds[0], fd);
1253 close(fds[0]);
1254 close(fds[1]);
1257 dup2(fds[0], STDIN_FILENO);
1261 dup2(fds[1], STDOUT_FILENO);
1265 close(fds[0]);
1266 close(fds[
[all...]
/freebsd-current/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/io/
H A Dtst.fds.c50 int fds[10]; local
77 * To test the fds[] array, we open /dev/null (a file with reliable
80 fds[n++] = open(file, O_RDONLY);
81 fds[n++] = open(file, O_WRONLY);
82 fds[n++] = open(file, O_RDWR);
84 fds[n++] = open(file, O_RDWR | O_APPEND | O_CREAT |
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...]
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...]
/freebsd-current/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-current/cddl/contrib/opensolaris/lib/libdtrace/common/
H A Ddt_open.c875 int *fds = realloc(dfp->df_fds, size * sizeof (int)); local
877 if (fds == NULL)
880 dfp->df_fds = fds;
962 int *fds = realloc(dfp->df_fds, size * sizeof (int)); local
964 if (fds == NULL)
967 dfp->df_fds = fds;
/freebsd-current/cddl/usr.sbin/dtrace/tests/common/io/
H A DMakefile9 tst.fds.d \
10 tst.fds.d.out \
16 tst.fds.c \
/freebsd-current/cddl/usr.sbin/dtrace/tests/common/privs/
H A DMakefile9 tst.fds.ksh \
/freebsd-current/cddl/usr.sbin/dtrace/tests/tools/
H A Dexclude.sh51 exclude EXFAIL common/io/tst.fds.d
86 exclude SKIP common/privs/tst.fds.ksh
/freebsd-current/cddl/usr.sbin/zfsd/
H A Dzfsd.cc329 struct pollfd fds[2]; local
343 fds[0].fd = m_devdSockFD;
344 fds[0].events = POLLIN;
345 fds[0].revents = 0;
346 fds[1].fd = s_signalPipeFD[0];
347 fds[1].events = POLLIN;
348 fds[1].revents = 0;
349 result = poll(fds, NUM_ELEMENTS(fds), /*timeout*/INFTIM);
359 if ((fds[
[all...]
/freebsd-current/contrib/bmake/
H A Djob.c447 static struct pollfd *fds = NULL; variable in typeref:struct:pollfd
574 /* Avoid using low-numbered fds */
2107 nready = poll(fds + 1 - wantToken, fdsLen - 1 + wantToken,
2137 if (fds[i].revents == 0)
2148 if (useMeta && job->inPollfd != &fds[i]) {
2150 fds[i].events = 0; /* never mind */
2293 fds = bmake_malloc(sizeof *fds * nfds);
2735 fds[fdsLen].fd = job->inPipe;
2736 fds[fdsLe
[all...]
/freebsd-current/contrib/capsicum-test/
H A Dcapability-fd.cc1287 int fds[2]; local
1288 EXPECT_OK(pipe(fds));
1291 EXPECT_EQ(-1, lseek(fds[0], 0, SEEK_SET));
1296 EXPECT_OK(cap_rights_limit(fds[0], &rights));
1298 EXPECT_EQ(-1, lseek(fds[0], 0, SEEK_SET));
1303 EXPECT_OK(cap_rights_limit(fds[0], &rights));
1304 EXPECT_EQ(-1, lseek(fds[0], 0, SEEK_SET));
1309 close(fds[0]);
1310 close(fds[1]);
H A Dlinux.cc584 int fds[3]; local
588 fds[count] = open(prog_candidates[ii], O_RDONLY);
589 if (fds[count] >= 0) {
606 int rc = fexecve_(fds[ii], argv_pass, null_envp);
614 close(fds[ii]);
H A Dselect.cc19 int InitFDSet(fd_set* fset, int *fds, int fdcount) { argument
23 maxfd = AddFDToSet(fset, fds[ii], maxfd);
/freebsd-current/contrib/diff/src/
H A Ddiff3.c1152 int fds[2];
1167 if (pipe (fds) != 0)
1174 close (fds[0]);
1175 if (fds[1] != STDOUT_FILENO)
1177 dup2 (fds[1], STDOUT_FILENO);
1178 close (fds[1]);
1191 close (fds[1]); /* Prevent erroneous lack of EOF */
1192 fd = fds[0];
1148 int fds[2]; local
/freebsd-current/contrib/file/src/
H A Dfuncs.c891 file_pipe_closexec(int *fds) argument
896 return pipe2(fds, O_CLOEXEC);
898 if (pipe(fds) == -1)
901 (void)fcntl(fds[0], F_SETFD, FD_CLOEXEC);
902 (void)fcntl(fds[1], F_SETFD, FD_CLOEXEC);
/freebsd-current/contrib/kyua/utils/process/
H A Dchild.cpp201 int fds[2]; local
202 if (detail::syscall_pipe(fds) == -1)
210 ::close(fds[0]);
211 ::close(fds[1]);
218 ::close(fds[0]);
219 safe_dup(fds[1], STDOUT_FILENO);
220 safe_dup(fds[1], STDERR_FILENO);
221 ::close(fds[1]);
228 ::close(fds[1]);
233 new process::child(new impl(pid, new process::ifdstream(fds[
[all...]
H A Dfdstream_test.cpp50 int fds[2]; local
51 ATF_REQUIRE(::pipe(fds) != -1);
53 ifdstream rend(fds[0]);
55 systembuf wbuf(fds[1]);
/freebsd-current/contrib/ldns/
H A Dnet.c158 fd_set fds; local
159 FD_ZERO(&fds);
160 FD_SET(FD_SET_T sockfd, &fds);
162 ret = select(sockfd+1, NULL, &fds, NULL, &timeout);
164 ret = select(sockfd+1, &fds, NULL, NULL, &timeout);
/freebsd-current/contrib/libarchive/libarchive/
H A Dfilter_fork_posix.c202 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-current/contrib/libevent/test/
H A Dregress.c370 evutil_socket_t **fds = ptr; local
372 evutil_closesocket(*fds[0]);
373 evutil_closesocket(*fds[1]);
374 *fds[0] = -1;
375 *fds[1] = -1;
/freebsd-current/contrib/llvm-project/compiler-rt/include/sanitizer/
H A Dnetbsd_syscall_hooks.h1121 #define __sanitizer_syscall_pre_poll(fds, nfds, timeout) \
1122 __sanitizer_syscall_pre_impl_poll((long long)(fds), (long long)(nfds), \
1124 #define __sanitizer_syscall_post_poll(res, fds, nfds, timeout) \
1125 __sanitizer_syscall_post_impl_poll(res, (long long)(fds), (long long)(nfds), \
2028 #define __sanitizer_syscall_pre_compat_50_pollts(fds, nfds, ts, mask) \
2030 (long long)(fds), (long long)(nfds), (long long)(ts), (long long)(mask))
2031 #define __sanitizer_syscall_post_compat_50_pollts(res, fds, nfds, ts, mask) \
2033 res, (long long)(fds), (long long)(nfds), (long long)(ts), \
2424 #define __sanitizer_syscall_pre___pollts50(fds, nfds, ts, mask) \
2425 __sanitizer_syscall_pre_impl___pollts50((long long)(fds), (lon
[all...]
/freebsd-current/contrib/llvm-project/compiler-rt/lib/dfsan/
H A Ddfsan_custom.cpp1468 int __dfsw_poll(struct pollfd *fds, nfds_t nfds, int timeout, argument
1471 int ret = poll(fds, nfds, timeout);
1474 dfsan_set_label(0, &fds[nfds - 1].revents, sizeof(fds[nfds - 1].revents));
1482 int __dfso_poll(struct pollfd *fds, nfds_t nfds, int timeout, argument
1487 return __dfsw_poll(fds, nfds, timeout, dfs_label, nfds_label, timeout_label,
/freebsd-current/contrib/llvm-project/compiler-rt/lib/sanitizer_common/
H A Dsanitizer_common_interceptors.inc4104 static void read_pollfd(void *ctx, __sanitizer_pollfd *fds,
4107 COMMON_INTERCEPTOR_READ_RANGE(ctx, &fds[i].fd, sizeof(fds[i].fd));
4108 COMMON_INTERCEPTOR_READ_RANGE(ctx, &fds[i].events, sizeof(fds[i].events));
4112 static void write_pollfd(void *ctx, __sanitizer_pollfd *fds,
4115 COMMON_INTERCEPTOR_WRITE_RANGE(ctx, &fds[i].revents,
4116 sizeof(fds[i].revents));
4119 INTERCEPTOR(int, poll, __sanitizer_pollfd *fds, __sanitizer_nfds_t nfds,
4122 COMMON_INTERCEPTOR_ENTER(ctx, poll, fds, nfd
[all...]
/freebsd-current/contrib/llvm-project/compiler-rt/lib/tsan/rtl/
H A Dtsan_fd.cpp96 FdDesc *fds = reinterpret_cast<FdDesc *>(l1); local
97 return &fds[fd % kTableSizeL2];
H A Dtsan_interceptors_posix.cpp1849 int fds[64];
1850 int cnt = ExtractResolvFDs(state, fds, ARRAY_SIZE(fds));
1851 for (int i = 0; i < cnt; i++) FdClose(thr, pc, fds[i]);
2410 int fds[64];
2411 int cnt = ExtractRecvmsgFDs(msg, fds, ARRAY_SIZE(fds));
2413 FdEventCreate(thr, pc, fds[i]);

Completed in 814 milliseconds

12345678