/freebsd-11-stable/lib/libc/gen/ |
H A D | dup3.c | 41 __dup3(int oldfd, int newfd, int flags) argument 45 if (oldfd == newfd) { 57 return (_fcntl(oldfd, how, newfd));
|
H A D | fts-compat.c | 1147 int ret, oerrno, newfd; local 1150 newfd = fd; 1153 if (fd < 0 && (newfd = _open(path, O_RDONLY | O_CLOEXEC, 0)) < 0) 1155 if (_fstat(newfd, &sb)) { 1164 ret = fchdir(newfd); 1168 (void)_close(newfd);
|
H A D | fts.c | 1123 int ret, oerrno, newfd; local 1126 newfd = fd; 1129 if (fd < 0 && (newfd = _open(path, O_RDONLY | O_DIRECTORY | 1132 if (_fstat(newfd, &sb)) { 1141 ret = fchdir(newfd); 1145 (void)_close(newfd);
|
/freebsd-11-stable/cddl/compat/opensolaris/misc/ |
H A D | fsshare.c | 155 FILE *newfd, *oldfd; local 158 newfd = oldfd = NULL; 178 newfd = fdopen(fd, "r+"); 179 assert(newfd != NULL); 202 fprintf(newfd, "%s", FILE_HEADER); 204 fprintf(newfd, "%s\n", line); 209 if (ferror(newfd) != 0) { 210 error = ferror(newfd); 214 fprintf(newfd, "%s\t%s\n", mountpoint, 226 fflush(newfd); [all...] |
/freebsd-11-stable/contrib/ntp/libntp/ |
H A D | socket.c | 79 SOCKET newfd; local 102 newfd = fcntl(fd, F_DUPFD, socket_boundary); 104 if (newfd != -1) { 107 return newfd;
|
/freebsd-11-stable/contrib/llvm-project/compiler-rt/lib/tsan/rtl/ |
H A D | tsan_fd.h | 46 void FdDup(ThreadState *thr, uptr pc, int oldfd, int newfd, bool write); 53 void FdSocketAccept(ThreadState *thr, uptr pc, int fd, int newfd);
|
H A D | tsan_fd.cpp | 225 void FdDup(ThreadState *thr, uptr pc, int oldfd, int newfd, bool write) { argument 226 DPrintf("#%d: FdDup(%d, %d)\n", thr->tid, oldfd, newfd); 227 if (bogusfd(oldfd) || bogusfd(newfd)) 232 FdClose(thr, pc, newfd, write); 233 init(thr, pc, newfd, ref(od->sync), write); 280 void FdSocketAccept(ThreadState *thr, uptr pc, int fd, int newfd) { argument 281 DPrintf("#%d: FdSocketAccept(%d, %d)\n", thr->tid, fd, newfd); 286 init(thr, pc, newfd, &fdctx.socksync);
|
H A D | tsan_interceptors_posix.cpp | 1555 int newfd = REAL(dup)(oldfd); local 1556 if (oldfd >= 0 && newfd >= 0 && newfd != oldfd) 1557 FdDup(thr, pc, oldfd, newfd, true); 1558 return newfd; 1561 TSAN_INTERCEPTOR(int, dup2, int oldfd, int newfd) { argument 1562 SCOPED_TSAN_INTERCEPTOR(dup2, oldfd, newfd); 1563 int newfd2 = REAL(dup2)(oldfd, newfd); 1570 TSAN_INTERCEPTOR(int, dup3, int oldfd, int newfd, int flags) { argument 1571 SCOPED_TSAN_INTERCEPTOR(dup3, oldfd, newfd, flag [all...] |
/freebsd-11-stable/stand/libsa/ |
H A D | nfs.c | 249 nfs_lookupfh(struct nfs_iodesc *d, const char *name, struct nfs_iodesc *newfd) argument 305 newfd->fhsize = ntohl(repl->fhsize); 306 bcopy(repl->fhplusattr, &newfd->fh, newfd->fhsize); 307 pos = roundup(newfd->fhsize, sizeof(uint32_t)) / sizeof(uint32_t); 312 bcopy(&repl->fhplusattr[pos], &newfd->fa, sizeof(newfd->fa)); 474 struct nfs_iodesc *newfd = NULL; local 527 currfd = malloc(sizeof(*newfd)); 534 newfd [all...] |
/freebsd-11-stable/usr.bin/bsdiff/bspatch/ |
H A D | bspatch.c | 115 int newfd, oldfd; local 154 if ((newfd = openat(dirfd, newfile, 175 cap_rights_limit(newfd, &rights_wr) < 0 || 304 if (write(newfd, new, newsize) != newsize || close(newfd) == -1)
|
/freebsd-11-stable/contrib/llvm-project/compiler-rt/lib/sanitizer_common/ |
H A D | sanitizer_solaris.cpp | 127 DECLARE__REAL_AND_INTERNAL(uptr, dup2, int oldfd, int newfd) { argument 128 return _REAL(dup2)(oldfd, newfd);
|
H A D | sanitizer_posix.h | 52 uptr internal_dup2(int oldfd, int newfd);
|
H A D | sanitizer_netbsd.cpp | 176 uptr internal_dup2(int oldfd, int newfd) { argument 178 return _REAL(dup2, oldfd, newfd);
|
H A D | sanitizer_mac.cpp | 183 uptr internal_dup2(int oldfd, int newfd) { argument 184 return dup2(oldfd, newfd);
|
H A D | sanitizer_linux.cpp | 381 uptr internal_dup2(int oldfd, int newfd) { argument 383 return internal_syscall(SYSCALL(dup3), oldfd, newfd, 0); 385 return internal_syscall(SYSCALL(dup2), oldfd, newfd);
|
/freebsd-11-stable/usr.sbin/lpr/common_source/ |
H A D | ctlinfo.c | 432 int chk3rd, has_uc, newfd, nogood, res; local 485 newfd = open(tfname2, O_WRONLY|O_CREAT|O_TRUNC, 0660); 486 if (newfd == -1) { 492 newcf = fdopen(newfd, "w"); 494 close(newfd);
|
/freebsd-11-stable/contrib/ofed/librdmacm/ |
H A D | preload.c | 88 int (*dup2)(int oldfd, int newfd); 1104 int dup2(int oldfd, int newfd) argument 1118 newfdi = idm_lookup(&idm, newfd); 1120 /* newfd cannot have been dup'ed directly */ 1123 close(newfd); 1126 ret = real.dup2(oldfd, newfd); 1127 if (!oldfdi || ret != newfd) 1132 close(newfd); 1137 idm_set(&idm, newfd, newfdi); 1150 return newfd; [all...] |
/freebsd-11-stable/contrib/atf/atf-c/detail/ |
H A D | process.c | 310 safe_dup(const int oldfd, const int newfd) argument 314 if (oldfd != newfd) { 315 if (dup2(oldfd, newfd) == -1) {
|
/freebsd-11-stable/usr.bin/xinstall/ |
H A D | xinstall.c | 1150 int newfd; local 1188 newfd = open(path, O_CREAT | O_RDWR | O_TRUNC, S_IRUSR | S_IWUSR); 1189 if (newfd < 0 && saved_errno != 0) 1191 return newfd;
|
/freebsd-11-stable/contrib/unbound/util/ |
H A D | netevent.h | 653 * @param newfd: new fd, or -1 to leave fd be. 657 void comm_point_start_listening(struct comm_point* c, int newfd, int msec);
|
H A D | netevent.c | 4045 comm_point_start_listening(struct comm_point* c, int newfd, int msec) argument 4048 c->fd==-1?newfd:c->fd, msec); 4077 verbose(5, "startlistening %d mode rw", (newfd==-1?c->fd:newfd)); 4080 verbose(5, "startlistening %d mode r", (newfd==-1?c->fd:newfd)); 4083 verbose(5, "startlistening %d mode w", (newfd==-1?c->fd:newfd)); 4087 if(newfd != -1) { 4088 if(c->fd != -1 && c->fd != newfd) { [all...] |
/freebsd-11-stable/gnu/usr.bin/rcs/lib/ |
H A D | rcsutil.c | 920 int newfd; local 922 newfd = 927 return movefd(newfd, fd);
|
/freebsd-11-stable/sys/compat/linux/ |
H A D | linux_file.c | 1676 intptr_t newfd; local 1678 if (args->oldfd == args->newfd) 1687 newfd = args->newfd; 1688 return (kern_fcntl(td, args->oldfd, cmd, newfd));
|
/freebsd-11-stable/contrib/llvm-project/compiler-rt/include/sanitizer/ |
H A D | linux_syscall_hooks.h | 730 #define __sanitizer_syscall_pre_dup2(oldfd, newfd) \ 731 __sanitizer_syscall_pre_impl_dup2((long)(oldfd), (long)(newfd)) 732 #define __sanitizer_syscall_post_dup2(res, oldfd, newfd) \ 733 __sanitizer_syscall_post_impl_dup2(res, (long)(oldfd), (long)(newfd)) 734 #define __sanitizer_syscall_pre_dup3(oldfd, newfd, flags) \ 735 __sanitizer_syscall_pre_impl_dup3((long)(oldfd), (long)(newfd), (long)(flags)) 736 #define __sanitizer_syscall_post_dup3(res, oldfd, newfd, flags) \ 737 __sanitizer_syscall_post_impl_dup3(res, (long)(oldfd), (long)(newfd), \ 2414 void __sanitizer_syscall_pre_impl_dup2(long oldfd, long newfd); 2415 void __sanitizer_syscall_post_impl_dup2(long res, long oldfd, long newfd); [all...] |
/freebsd-11-stable/contrib/unbound/daemon/ |
H A D | remote.c | 447 int newfd; local 454 newfd = comm_point_perform_accept(c, &addr, &addrlen); 455 if(newfd == -1) 461 sock_close(newfd); 471 n->fd = newfd; 473 n->c = comm_point_create_raw(rc->worker->base, newfd, 0, 497 if(!SSL_set_fd(n->ssl, newfd)) {
|