/glibc-2.36/sysdeps/mach/hurd/ |
D | dup3.c | 30 __dup3 (int fd, int fd2, int flags) in __dup3() argument 37 || fd2 == fd) in __dup3() 41 && fd2 == fd)) in __dup3() 55 fd2 = __hurd_fail (EBADF); in __dup3() 57 else if (fd2 == fd) in __dup3() 66 if (fd2 < 0) in __dup3() 67 fd2 = __hurd_fail (EBADF); in __dup3() 75 if (fd2 >= _hurd_dtablesize) in __dup3() 81 d2 = _hurd_alloc_fd (NULL, fd2); in __dup3() 88 d2 = _hurd_dtable[fd2]; in __dup3() [all …]
|
D | dup2.c | 24 __dup2 (int fd, int fd2) in __dup2() argument 28 if (fd2 == fd) in __dup2() 32 return __dup3 (fd, fd2, flags); in __dup2()
|
/glibc-2.36/sysdeps/posix/ |
D | dup2.c | 26 __dup2 (int fd, int fd2) in __dup2() argument 30 if (fd2 < 0 in __dup2() 32 || fd2 >= OPEN_MAX in __dup2() 44 if (fd == fd2) in __dup2() 45 return fd2; in __dup2() 50 (void) close (fd2); in __dup2() 53 return fcntl (fd, F_DUPFD, fd2); in __dup2()
|
/glibc-2.36/io/ |
D | tst-fcntl.c | 66 int fd2; in do_test() local 162 fd2 = open (_PATH_DEVNULL, O_RDWR); in do_test() 163 if (fd2 == -1) in do_test() 165 close (fd2); in do_test() 167 fd3 = fcntl (fd, F_DUPFD, fd2 + 1); in do_test() 170 printf ("fcntl(fd, F_DUPFD, %d) failed: %m\n", fd2 + 1); in do_test() 173 else if (fd3 <= fd2) in do_test() 175 printf ("F_DUPFD returned %d which is not larger than %d\n", fd3, fd2); in do_test()
|
D | bug-ftw4.c | 39 int ret, i, result = 0, fd, fd1, fd2; in main() local 95 fd2 = open (name, O_RDONLY); in main() 96 if (fd2 < 0) in main() 102 close (fd2); in main() 106 if (fd2 >= fd1 + 128) in main() 108 printf ("ftw64 leaking fds: %d -> %d\n", fd1, fd2); in main()
|
D | dup2.c | 26 __dup2 (int fd, int fd2) in __dup2() argument 28 if (fd < 0 || fd2 < 0) in __dup2() 34 if (fd == fd2) in __dup2() 36 return fd2; in __dup2()
|
D | dup3.c | 27 __dup3 (int fd, int fd2, int flags) in __dup3() argument 29 if (fd < 0 || fd2 < 0) in __dup3() 35 if (fd == fd2) in __dup3() 37 return fd2; in __dup3()
|
D | test-lfs.c | 146 int ret, fd2; in do_test() local 218 fd2 = openat64 (AT_FDCWD, name, O_RDWR); in do_test() 219 if (fd2 == -1) in do_test() 231 ret = close (fd2); in do_test()
|
D | tst-openat.c | 101 int fd2 = openat (fd, "should-not-work", O_CREAT|O_RDWR, 0666); in do_test() local 102 if (fd2 != -1) in do_test()
|
/glibc-2.36/posix/ |
D | tst-spawn.c | 87 int fd2; in handle_restart() local 94 fd2 = atol (fd2s); in handle_restart() 100 TEST_VERIFY_EXIT (fd1 != fd2); in handle_restart() 103 TEST_VERIFY_EXIT (fd2 != fd3); in handle_restart() 104 TEST_VERIFY_EXIT (fd2 != fd4); in handle_restart() 110 TEST_COMPARE (xlseek (fd2, 0, SEEK_CUR), strlen (fd2string)); in handle_restart() 113 TEST_COMPARE (xlseek (fd2, 0, SEEK_SET), 0); in handle_restart() 115 TEST_COMPARE (read (fd2, buf, sizeof buf), strlen (fd2string)); in handle_restart()
|
D | tst-exec.c | 78 int fd2; in handle_restart() local 82 fd2 = atol (fd2s); in handle_restart() 85 if (fd1 == fd2) in handle_restart() 90 if (lseek (fd2, 0, SEEK_CUR) != strlen (fd2string)) in handle_restart() 92 if (lseek (fd2, 0, SEEK_SET) != 0) in handle_restart() 94 if (read (fd2, buf, sizeof buf) != strlen (fd2string)) in handle_restart()
|
D | tst-execvpe6.c | 48 int fd2 = create_temp_file ("testscript", &fname2); in do_prepare() local 49 dprintf (fd2, "echo foo > %s\n", logname); in do_prepare() 50 fchmod (fd2, 0700); in do_prepare() 51 close (fd2); in do_prepare()
|
/glibc-2.36/stdio-common/ |
D | test-vfprintf.c | 61 int fd2; in do_test() local 68 fd2 = dup (fd); in do_test() 69 if (fd2 == -1) in do_test() 76 if (ftruncate (fd2, 0) != 0) in do_test() 83 fp = fdopen (fd2, "a"); in do_test()
|
D | bug7.c | 44 int fd2 = mkstemp (filename2); in main() local 45 if (fd1 == -1 || fd2 == -1) in main() 53 close (fd2); in main()
|
/glibc-2.36/sysdeps/unix/sysv/linux/generic/ |
D | dup2.c | 25 __dup2 (int fd, int fd2) in __dup2() argument 29 if (fd == fd2) in __dup2() 32 return INLINE_SYSCALL (dup3, 3, fd, fd2, 0); in __dup2()
|
/glibc-2.36/elf/ |
D | sprof.c | 627 int fd2 = open (workbuf, O_RDONLY); in load_shobj() local 628 if (fd2 == -1) in load_shobj() 632 fd2 = open (workbuf, O_RDONLY); in load_shobj() 633 if (fd2 == -1) in load_shobj() 637 fd2 = open (workbuf, O_RDONLY); in load_shobj() 641 if (fd2 != -1) in load_shobj() 646 if (pread (fd2, &ehdr2, sizeof (ehdr2), 0) != sizeof (ehdr2)) in load_shobj() 653 if (pread (fd2, shdr2, size, ehdr2.e_shoff) != size) in load_shobj() 659 if (pread (fd2, shstrtab, shdr2[ehdr2.e_shstrndx].sh_size, in load_shobj() 672 symfd = fd2; in load_shobj() [all …]
|
/glibc-2.36/locale/programs/ |
D | locfile.c | 499 int fd1, fd2; in compare_files() local 505 fd2 = open (filename2, O_RDONLY); in compare_files() 506 if (fd2 >= 0) in compare_files() 521 if (full_read (fd2, buf2, bytes) < (ssize_t) bytes) in compare_files() 535 close (fd2); in compare_files()
|