fd_dup2
error = fd_dup2(fp, to, flags);
error += fd_dup2(fp, 1, 0);
error += fd_dup2(fp, 2, 0);
int fd_dup2(file_t *, unsigned, int);