摘要:
#include #include #include int mydup(int i_OldFd, int i_NewFd);int main(void){ int fd = -1; fd = open("tests.c", O_RDONLY); if(fd 256) { printf("Oldfd is wrong.\n"); return -1; } if(i_NewFd 256) { printf("Newfd is wrong.\n"); return -1; } if( i_NewFd == i_OldFd) return 阅读全文