/openbsd-current/bin/pax/ |
H A D | ar_io.c | 1245 int fds[2]; local 1248 if (pipe(fds) == -1) 1257 dup2(fds[1], fd); 1259 dup2(fds[0], fd); 1260 close(fds[0]); 1261 close(fds[1]); 1277 dup2(fds[0], STDIN_FILENO); 1281 dup2(fds[1], STDOUT_FILENO); 1285 close(fds[0]); 1286 close(fds[ [all...] |
/openbsd-current/gnu/usr.bin/perl/ext/POSIX/t/ |
H A D | posix.t | 70 @fds = POSIX::pipe(); 71 cmp_ok($fds[0], '>', $testfd, 'POSIX::pipe'); 73 CORE::open(my $reader, "<&=".$fds[0]); 74 CORE::open(my $writer, ">&=".$fds[1]); 139 skip("_POSIX_OPEN_MAX undefined ($fds[1])", 1) unless &_POSIX_OPEN_MAX;
|
/openbsd-current/usr.bin/rsync/ |
H A D | main.c | 357 int fds[2], sd = -1, rc, c, st, i, lidx; local 593 if (socketpair(AF_UNIX, SOCK_STREAM | SOCK_NONBLOCK, 0, fds) == -1) 600 close(fds[0]); 613 if (dup2(fds[1], STDIN_FILENO) == -1) 615 if (dup2(fds[1], STDOUT_FILENO) == -1) 621 close(fds[1]); 623 rc = rsync_client(&opts, fds[0], fargs); 625 rc = rsync_socket(&opts, fds[0], fargs); 629 close(fds[0]);
|
/openbsd-current/usr.sbin/vmctl/ |
H A D | vmctl.c | 295 int fds[2], readn, writen; local 308 if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, fds) == -1) { 311 imsg_compose(ibuf, IMSG_VMDOP_SEND_VM_REQUEST, 0, 0, fds[0], 315 readn = atomicio(read, fds[1], buf, pagesz); 336 int fds[2], readn, writen; local 348 if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, fds) == -1) { 351 imsg_compose(ibuf, IMSG_VMDOP_RECEIVE_VM_REQUEST, 0, 0, fds[0], 357 close(fds[1]); 360 writen = atomicio(vwrite, fds[1], buf, readn);
|
/openbsd-current/gnu/usr.bin/binutils/gdb/ |
H A D | nto-procfs.c | 974 int fd, fds[3]; local 993 fds[0] = STDIN_FILENO; 994 fds[1] = STDOUT_FILENO; 995 fds[2] = STDERR_FILENO; 1015 fds[0] = fd; 1023 fds[1] = fd; 1031 fds[2] = fd; 1051 pid = spawnp (argv[0], 3, fds, &inherit, argv, 1060 if (fds[0] != STDIN_FILENO) 1061 close (fds[ [all...] |
/openbsd-current/gnu/usr.bin/perl/dist/IO/ |
H A D | IO.xs | 272 * doesn't matter what it is, since we're telling it to not check any fds. 274 struct pollfd *fds = nfd ? (struct pollfd *)SvPVX(tmpsv) : (struct pollfd *)tmpsv; 277 fds[j].fd = SvIV(ST(i)); 279 fds[j].events = (short)SvIV(ST(i)); 281 fds[j].revents = 0; 283 if((ret = poll(fds,nfd,timeout)) >= 0) { 285 sv_setiv(ST(i), fds[j].fd); i++; 286 sv_setiv(ST(i), fds[j].revents); i++;
|
/openbsd-current/gnu/llvm/lldb/third_party/Python/module/pexpect-4.6/pexpect/ |
H A D | utils.py | 159 def poll_ignore_interrupts(fds, timeout=None): 167 for fd in fds:
|
/openbsd-current/sys/sys/ |
H A D | ktrace.h | 266 #define ktrfds(p, fds, count) \ 267 ktrstruct(p, "fds", fds, (count) * sizeof(int))
|
/openbsd-current/sbin/unwind/libunbound/util/ |
H A D | mini_event.h | 39 * The back end is only select. Max number of fds is limited. 43 * Although limited to select() and a max (1024) open fds, it 46 * o handler calling takes time ~ to the number of fds. 107 struct event** fds; member in struct:event_base 110 /** capacity - size of the fds array */ 112 /* fdset for read write, for fds ready, and added */ 114 /** fds for reading */ 116 /** fds for writing */ 118 /** fds determined ready for use */
|
/openbsd-current/usr.sbin/unbound/util/ |
H A D | mini_event.h | 39 * The back end is only select. Max number of fds is limited. 43 * Although limited to select() and a max (1024) open fds, it 46 * o handler calling takes time ~ to the number of fds. 107 struct event** fds; member in struct:event_base 110 /** capacity - size of the fds array */ 112 /* fdset for read write, for fds ready, and added */ 114 /** fds for reading */ 116 /** fds for writing */ 118 /** fds determined ready for use */
|
/openbsd-current/usr.bin/mg/ |
H A D | dired.c | 651 int fds[2] = { -1, -1 }; local 688 if (pipe(fds) == -1) { 707 close(fds[0]); 709 dup2(fds[1], STDOUT_FILENO); 710 dup2(fds[1], STDERR_FILENO); 717 close(fds[1]); 718 infd = fds[1] = -1; 719 if ((fin = fdopen(fds[0], "r")) == NULL) 742 if (fds[0] != -1) 743 close(fds[ [all...] |
/openbsd-current/lib/libc/rpc/ |
H A D | svc.c | 171 fd_set *fds; local 176 if ((fds = (fd_set *)mem_alloc(bytes)) != NULL) { 177 memset(fds, 0, bytes); 178 memcpy(fds, __svc_fdset, 182 __svc_fdset = fds;
|
/openbsd-current/sbin/isakmpd/ |
H A D | udp.c | 482 udp_fd_set(struct transport *t, fd_set *fds, int bit) argument 487 FD_SET(u->s, fds); 489 FD_CLR(u->s, fds); 495 udp_fd_isset(struct transport *t, fd_set *fds) argument 499 return FD_ISSET(u->s, fds);
|
/openbsd-current/gnu/llvm/compiler-rt/lib/tsan/rtl/ |
H A D | tsan_platform_linux.cpp | 332 // This is required to properly "close" the fds, because we do not see internal 334 int ExtractResolvFDs(void *state, int *fds, int nfd) { argument 340 fds[cnt++] = statp->_u._ext.nssocks[i]; 349 // This is required to properly handle "open" of these fds. 351 int ExtractRecvmsgFDs(void *msgp, int *fds, int nfd) { argument 358 int n = (cmsg->cmsg_len - CMSG_LEN(0)) / sizeof(fds[0]); 360 fds[res++] = ((int*)CMSG_DATA(cmsg))[i];
|
/openbsd-current/sys/kern/ |
H A D | sys_pipe.c | 178 int fds[2], cloexec, error; local 190 error = falloc(p, &rf, &fds[0]); 198 error = falloc(p, &wf, &fds[1]); 206 fdinsert(fdp, fds[0], cloexec, rf); 207 fdinsert(fdp, fds[1], cloexec, wf); 209 error = copyout(fds, ufds, sizeof(fds)); 214 ktrfds(p, fds, 2); 218 fdrelease(p, fds[0]); 220 fdrelease(p, fds[ [all...] |
H A D | uipc_usrreq.c | 1043 int i, *fds = NULL; local 1100 fds = mallocarray(nfds, sizeof(int), M_TEMP, M_WAITOK); 1110 if ((error = fdalloc(p, 0, &fds[i])) != 0) { 1115 fdremove(fdp, fds[i]); 1140 KASSERT(fdp->fd_ofiles[fds[i]] == NULL); 1141 fdp->fd_ofiles[fds[i]] = rp->fp; 1144 fdp->fd_ofileflags[fds[i]] = (rp->flags & UF_PLEDGED); 1146 fdp->fd_ofileflags[fds[i]] |= UF_EXCLOSE; 1185 memcpy(CMSG_DATA(cm), fds, nfds * sizeof(int)); local 1189 if (fds ! [all...] |
/openbsd-current/usr.bin/cvs/ |
H A D | util.c | 888 int fds[2], st; local 891 if (in != NULL && pipe(fds) == -1) { 901 close(fds[1]); 902 dup2(fds[0], STDIN_FILENO); 912 close(fds[0]); 914 if (atomicio(vwrite, fds[1], in, size) != size) 916 close(fds[1]);
|
/openbsd-current/regress/sys/kern/select/ |
H A D | select_iocond.c | 91 int bfd[2], fds[2]; local 129 if (pipe(fds) == -1) 131 parent_fd = fds[0]; 132 child_fd = fds[1]; 175 if (socketpair(AF_UNIX, SOCK_STREAM, 0, fds) == -1) 177 parent_fd = fds[0]; 178 child_fd = fds[1];
|
/openbsd-current/regress/sys/kern/poll/ |
H A D | poll_iocond.c | 90 int bfd[2], fds[2]; local 128 if (pipe(fds) == -1) 130 parent_fd = fds[0]; 131 child_fd = fds[1]; 174 if (socketpair(AF_UNIX, SOCK_STREAM, 0, fds) == -1) 176 parent_fd = fds[0]; 177 child_fd = fds[1];
|
/openbsd-current/usr.sbin/sasyncd/ |
H A D | net.c | 422 net_set_pending_wfds(fd_set *fds) argument 429 FD_SET(p->socket, fds); 441 net_set_rfds(fd_set *fds) argument 448 FD_SET(p->socket, fds); 453 FD_SET(listeners[i], fds); 519 net_handle_messages(fd_set *fds) argument 527 if (FD_ISSET(listeners[i], fds)) 531 if (p->socket < 0 || !FD_ISSET(p->socket, fds)) 570 net_send_messages(fd_set *fds) argument 578 if (p->socket < 0 || !FD_ISSET(p->socket, fds)) [all...] |
/openbsd-current/lib/libc/asr/ |
H A D | asr.c | 211 poll_intrsafe(struct pollfd *fds, nfds_t nfds, int timeout) argument 219 while ((r = poll(fds, 1, timeout)) == -1 && errno == EINTR) { 237 struct pollfd fds[1]; local 241 fds[0].fd = ar->ar_fd; 242 fds[0].events = (ar->ar_cond == ASR_WANT_READ) ? POLLIN:POLLOUT; 244 if (poll_intrsafe(fds, 1, ar->ar_timeout) == -1) {
|
/openbsd-current/lib/libutil/ |
H A D | imsg.c | 49 TAILQ_INIT(&imsgbuf->fds); 114 TAILQ_INSERT_TAIL(&imsgbuf->fds, ifd, 421 if ((ifd = TAILQ_FIRST(&imsgbuf->fds)) == NULL) 425 TAILQ_REMOVE(&imsgbuf->fds, ifd, entry);
|
/openbsd-current/usr.sbin/vmd/ |
H A D | vmm.c | 97 * sendfd - for sending send/recv fds to vm proc. 98 * recvfd - for disks, interfaces and other fds. 654 int fds[2]; local 671 if (socketpair(AF_UNIX, SOCK_STREAM | SOCK_NONBLOCK, PF_UNSPEC, fds) 686 close_fd(fds[1]); 689 sz = atomicio(vwrite, fds[0], vm, sizeof(*vm)); 697 /* As the parent/vmm process, we no longer need these fds. */ 720 sz = atomicio(vwrite, fds[0], &env->vmd_cfg.cfg_localprefix, 730 sz = atomicio(read, fds[0], &vcp->vcp_id, sizeof(vcp->vcp_id)); 747 if (vmm_pipe(vm, fds[ [all...] |
/openbsd-current/usr.sbin/amd/amd/ |
H A D | nfs_start.c | 81 dlog("%d new fds allocated; total is %d", 99 do_select(sigset_t *mask, sigset_t *omask, int fds, fd_set *fdp, argument 132 nsel = select(fds, fdp, NULL, NULL,
|
/openbsd-current/usr.sbin/relayd/ |
H A D | proc.c | 168 /* Parent already distributed its fds. */ 184 int fds[2]; local 212 PF_UNSPEC, fds) == -1) 215 pa->pp_pipes[dst][proc] = fds[0]; 216 pb->pp_pipes[PROC_PARENT][0] = fds[1]; 315 * Each process instance has a destination array of socketpair fds: 388 int fds[2]; local 407 PF_UNSPEC, fds) == -1) 410 pa->pp_pipes[dst][j] = fds[0]; 411 pb->pp_pipes[src][i] = fds[ [all...] |