Lines Matching refs:oldfd
55 Int VG_(safe_fd)(Int oldfd) in VG_()
61 newfd = VG_(fcntl)(oldfd, VKI_F_DUPFD, VG_(fd_hard_limit)); in VG_()
63 VG_(close)(oldfd); in VG_()
470 SysRes VG_(dup) ( Int oldfd ) in VG_()
473 return VG_(do_syscall1)(__NR_dup, oldfd); in VG_()
475 return VG_(do_syscall3)(__NR_fcntl, oldfd, F_DUPFD, 0); in VG_()
481 SysRes VG_(dup2) ( Int oldfd, Int newfd ) in VG_()
488 if (oldfd == newfd) { in VG_()
489 if (VG_(fcntl)(oldfd, VKI_F_GETFL, 0) == -1) in VG_()
493 return VG_(do_syscall3)(__NR_dup3, oldfd, newfd, 0); in VG_()
495 return VG_(do_syscall2)(__NR_dup2, oldfd, newfd); in VG_()
497 return VG_(do_syscall3)(__NR_fcntl, oldfd, F_DUP2FD, newfd); in VG_()