dup
int dup(int fd);
use
duplicate a file descriptor
return code
return the copy of the file descriptor on sucess or return -1 and set errno on error
EBADF
fd
is not open or don’t existEIO
an IO error happend while duplicatingfd
int dup(int fd);
duplicate a file descriptor
return the copy of the file descriptor on sucess or return -1 and set errno on error
EBADF
fd
is not open or don’t existEIO
fd