15 if (to == from)
return 0;
16 if (fcntl(from,F_GETFL,0) == -1)
return -1;
18 if (fcntl(from,F_DUPFD,to) == -1)
return -1;
24 if (to == from)
return 0;
25 if (
fd_copy(to,from) == -1)
return -1;
32 return fcntl(fd,F_SETFD,1);
int fd_move(int to, int from)
int fd_copy(int to, int from)