Lines Matching defs:fd2
1070 int SysDup2(int fd1, int fd2)
1074 int sysfd2 = GetAssociatedSystemFd(fd2);
1077 if ((sysfd1 < 0) || (sysfd1 >= CONFIG_NFILE_DESCRIPTORS) || (CheckProcessFd(fd2) != OK)) {
1082 if (fd1 == fd2) {
1083 return fd2;
1086 ret = AllocSpecifiedProcessFd(fd2);
1095 AssociateSystemFd(fd2, sysfd2);
1101 AssociateSystemFd(fd2, sysfd1);
1103 /* if fd1 is not equal to fd2, the FD_CLOEXEC flag associated with fd2 shall be cleared */
1104 ClearCloexecFlag(fd2);
1105 return fd2;