/openbsd/sys/lib/libsa/ |
H A D | nfs.c | 218 bcopy( repl->fh, &newfd->fh, sizeof(newfd->fh)); in nfs_lookupfh() 219 bcopy(&repl->fa, &newfd->fa, sizeof(newfd->fa)); in nfs_lookupfh() 381 newfd = 0; in nfs_open() 402 newfd = alloc(sizeof(*newfd)); in nfs_open() 404 newfd->off = 0; in nfs_open() 462 free(newfd, sizeof(*newfd)); in nfs_open() 463 newfd = 0; in nfs_open() 470 currfd = newfd; in nfs_open() 471 newfd = 0; in nfs_open() 489 if (newfd) in nfs_open() [all …]
|
/openbsd/gnu/usr.bin/cvs/lib/ |
H A D | dup2.c | 17 dup2( oldfd, newfd ) in dup2() argument 19 int newfd; /* desired duplicate descriptor */ 24 if ( oldfd == newfd ) 28 (void) close( newfd ); /* in case newfd is open */ 31 ret = fcntl( oldfd, F_DUPFD, newfd ); /* dupe it */
|
/openbsd/regress/lib/libpthread/dup2_race/ |
H A D | dup2_race.c | 55 int fd, newfd, i, j; in main() local 68 CHECKe(newfd = socket(AF_INET, SOCK_DGRAM, 0)); in main() 71 busy_thread, (void *)&newfd)); in main() 73 CHECKe(dup2(fd, newfd)); in main() 78 CHECKe(close(newfd)); in main()
|
/openbsd/regress/lib/libpthread/blocked_dup2/ |
H A D | blocked_dup2.c | 65 int fd, newfd, i, j; in main() local 83 CHECKe(newfd = socket(AF_INET, SOCK_DGRAM, 0)); in main() 84 CHECKr(bind(newfd, (struct sockaddr *)&addr, sizeof(addr))); in main() 89 waiting_read, (void *)&newfd)); in main() 91 CHECKe(dup2(fd, newfd)); in main()
|
/openbsd/regress/sys/dev/fdesc/ |
H A D | confuse.c | 18 int fd, newfd; in main() local 28 if ((newfd = open(fname, O_RDONLY)) == fd) in main() 31 if (newfd >= 0) in main()
|
/openbsd/gnu/usr.bin/cvs/os2/ |
H A D | run.c | 444 int newfd; /* Gets set to one end of the pipe and returned. */ in filter_stream_through_program() local 469 newfd = from; in filter_stream_through_program() 470 _setmode (newfd, O_BINARY); in filter_stream_through_program() 485 newfd = to; in filter_stream_through_program() 486 _setmode (newfd, O_BINARY); in filter_stream_through_program() 514 return newfd; in filter_stream_through_program()
|
/openbsd/gnu/llvm/compiler-rt/lib/tsan/rtl/ |
H A D | tsan_fd.cpp | 260 void FdDup(ThreadState *thr, uptr pc, int oldfd, int newfd, bool write) { in FdDup() argument 261 DPrintf("#%d: FdDup(%d, %d)\n", thr->tid, oldfd, newfd); in FdDup() 262 if (bogusfd(oldfd) || bogusfd(newfd)) in FdDup() 267 FdClose(thr, pc, newfd, write); in FdDup() 268 init(thr, pc, newfd, ref(od->sync), write); in FdDup() 339 void FdSocketAccept(ThreadState *thr, uptr pc, int fd, int newfd) { in FdSocketAccept() argument 340 DPrintf("#%d: FdSocketAccept(%d, %d)\n", thr->tid, fd, newfd); in FdSocketAccept() 345 init(thr, pc, newfd, &fdctx.socksync); in FdSocketAccept()
|
H A D | tsan_fd.h | 46 void FdDup(ThreadState *thr, uptr pc, int oldfd, int newfd, bool write); 54 void FdSocketAccept(ThreadState *thr, uptr pc, int fd, int newfd);
|
H A D | tsan_interceptors_posix.cpp | 1725 int newfd = REAL(dup)(oldfd); in TSAN_INTERCEPTOR() local 1726 if (oldfd >= 0 && newfd >= 0 && newfd != oldfd) in TSAN_INTERCEPTOR() 1727 FdDup(thr, pc, oldfd, newfd, true); in TSAN_INTERCEPTOR() 1728 return newfd; in TSAN_INTERCEPTOR() 1731 TSAN_INTERCEPTOR(int, dup2, int oldfd, int newfd) { in TSAN_INTERCEPTOR() argument 1732 SCOPED_TSAN_INTERCEPTOR(dup2, oldfd, newfd); in TSAN_INTERCEPTOR() 1733 int newfd2 = REAL(dup2)(oldfd, newfd); in TSAN_INTERCEPTOR() 1740 TSAN_INTERCEPTOR(int, dup3, int oldfd, int newfd, int flags) { in TSAN_INTERCEPTOR() argument 1741 SCOPED_TSAN_INTERCEPTOR(dup3, oldfd, newfd, flags); in TSAN_INTERCEPTOR() 1742 int newfd2 = REAL(dup3)(oldfd, newfd, flags); in TSAN_INTERCEPTOR() [all …]
|
/openbsd/usr.sbin/ldpd/ |
H A D | packet.c | 320 int newfd; in session_accept() local 329 newfd = accept4(fd, (struct sockaddr *)&src, &len, in session_accept() 331 if (newfd == -1) { in session_accept() 367 close(newfd); in session_accept() 369 pending_conn_new(newfd, af, &addr); in session_accept() 374 close(newfd); in session_accept() 380 close(newfd); in session_accept() 384 session_accept_nbr(nbr, newfd); in session_accept()
|
/openbsd/usr.bin/tmux/ |
H A D | server.c | 365 int newfd; in server_accept() local 372 newfd = accept(fd, (struct sockaddr *) &sa, &slen); in server_accept() 373 if (newfd == -1) { in server_accept() 385 close(newfd); in server_accept() 388 c = server_client_create(newfd); in server_accept()
|
/openbsd/lib/libc/gen/ |
H A D | fts.c | 1025 int ret, oerrno, newfd; in fts_safe_changedir() local 1028 newfd = fd; in fts_safe_changedir() 1031 if (fd == -1 && (newfd = open(path, O_RDONLY|O_DIRECTORY|O_CLOEXEC)) == -1) in fts_safe_changedir() 1033 if (fstat(newfd, &sb) == -1) { in fts_safe_changedir() 1042 ret = fchdir(newfd); in fts_safe_changedir() 1046 (void)close(newfd); in fts_safe_changedir()
|
/openbsd/gnu/usr.bin/cvs/windows-NT/ |
H A D | run.c | 654 int newfd; local 691 if ((newfd = _open_osfhandle ((long) newfd_handle, _O_BINARY)) == -1) 696 return newfd;
|
/openbsd/gnu/llvm/compiler-rt/lib/sanitizer_common/ |
H A D | sanitizer_solaris.cpp | 141 DECLARE__REAL_AND_INTERNAL(uptr, dup2, int oldfd, int newfd) { in DECLARE__REAL_AND_INTERNAL() argument 142 return _REAL(dup2)(oldfd, newfd); in DECLARE__REAL_AND_INTERNAL()
|
H A D | sanitizer_netbsd.cpp | 187 uptr internal_dup2(int oldfd, int newfd) { in internal_dup2() argument 189 return _REAL(dup2, oldfd, newfd); in internal_dup2()
|
H A D | sanitizer_posix.h | 53 uptr internal_dup2(int oldfd, int newfd);
|
/openbsd/usr.sbin/nsd/ |
H A D | remote.c | 584 int newfd; in remote_accept_callback() local 594 newfd = accept(fd, (struct sockaddr*)&addr, &addrlen); in remote_accept_callback() 596 newfd = accept4(fd, (struct sockaddr*)&addr, &addrlen, SOCK_NONBLOCK); in remote_accept_callback() 598 if(newfd == -1) { in remote_accept_callback() 618 close(newfd); in remote_accept_callback() 623 if (fcntl(newfd, F_SETFL, O_NONBLOCK) == -1) { in remote_accept_callback() 638 n->fd = newfd; in remote_accept_callback() 641 event_set(&n->c, newfd, EV_PERSIST|EV_TIMEOUT|EV_READ, in remote_accept_callback() 678 if(!SSL_set_fd(n->ssl, newfd)) { in remote_accept_callback() 701 remote_control_callback(newfd, EV_READ, n); in remote_accept_callback()
|
/openbsd/usr.sbin/unbound/testcode/ |
H A D | delayer.c | 554 int newfd; local 558 newfd = accept(s, (struct sockaddr*)&addr, &addr_len); 559 if(newfd == -1) { 576 p->client_s = newfd;
|
/openbsd/gnu/llvm/compiler-rt/include/sanitizer/ |
H A D | linux_syscall_hooks.h | 730 #define __sanitizer_syscall_pre_dup2(oldfd, newfd) \ argument 731 __sanitizer_syscall_pre_impl_dup2((long)(oldfd), (long)(newfd)) 732 #define __sanitizer_syscall_post_dup2(res, oldfd, newfd) \ argument 733 __sanitizer_syscall_post_impl_dup2(res, (long)(oldfd), (long)(newfd)) 734 #define __sanitizer_syscall_pre_dup3(oldfd, newfd, flags) \ argument 735 __sanitizer_syscall_pre_impl_dup3((long)(oldfd), (long)(newfd), (long)(flags)) 736 #define __sanitizer_syscall_post_dup3(res, oldfd, newfd, flags) \ argument 2423 void __sanitizer_syscall_pre_impl_dup2(long oldfd, long newfd); 2424 void __sanitizer_syscall_post_impl_dup2(long res, long oldfd, long newfd); 2425 void __sanitizer_syscall_pre_impl_dup3(long oldfd, long newfd, long flags); [all …]
|
/openbsd/usr.sbin/unbound/util/ |
H A D | netevent.c | 4849 comm_point_start_listening(struct comm_point* c, int newfd, int msec) argument 4852 c->fd==-1?newfd:c->fd, msec); 4885 verbose(5, "startlistening %d mode rw", (newfd==-1?c->fd:newfd)); 4888 verbose(5, "startlistening %d mode r", (newfd==-1?c->fd:newfd)); 4891 verbose(5, "startlistening %d mode w", (newfd==-1?c->fd:newfd)); 4895 if(newfd != -1) { 4896 if(c->fd != -1 && c->fd != newfd) { 4897 verbose(5, "cpsl close of fd %d for %d", c->fd, newfd); 4900 c->fd = newfd;
|
H A D | netevent.h | 691 void comm_point_start_listening(struct comm_point* c, int newfd, int msec);
|
/openbsd/sbin/unwind/libunbound/util/ |
H A D | netevent.c | 4849 comm_point_start_listening(struct comm_point* c, int newfd, int msec) argument 4852 c->fd==-1?newfd:c->fd, msec); 4885 verbose(5, "startlistening %d mode rw", (newfd==-1?c->fd:newfd)); 4888 verbose(5, "startlistening %d mode r", (newfd==-1?c->fd:newfd)); 4891 verbose(5, "startlistening %d mode w", (newfd==-1?c->fd:newfd)); 4895 if(newfd != -1) { 4896 if(c->fd != -1 && c->fd != newfd) { 4897 verbose(5, "cpsl close of fd %d for %d", c->fd, newfd); 4900 c->fd = newfd;
|
H A D | netevent.h | 691 void comm_point_start_listening(struct comm_point* c, int newfd, int msec);
|
/openbsd/gnu/llvm/compiler-rt/lib/memprof/ |
H A D | memprof_interceptors.cpp | 84 #define COMMON_INTERCEPTOR_FD_SOCKET_ACCEPT(ctx, fd, newfd) \ argument
|
/openbsd/gnu/usr.bin/gcc/gcc/ |
H A D | collect2.c | 311 dup2 (oldfd, newfd) in dup2() argument 313 int newfd; 319 if (oldfd == newfd) 321 close (newfd); 322 while ((fd = dup (oldfd)) != newfd && fd >= 0) /* good enough for low fd's */
|