dduupp22() -- General Function (libc)

Duplicate a file descriptor
#iinncclluuddee <uunniissttdd.hh>
iinntt dduupp22(_f_d, _n_e_w_f_d) iinntt _f_d, _n_e_w_f_d;

dduupp22() duplicates  the file descriptor _f_d. Unlike  its cousin dduupp(), dduupp22()
allows you to  specify a new file descriptor _n_e_w_f_d,  rather than having the
system select one.   If _n_e_w_f_d is already open, the  system closes it before
assigning it to the new file.  dduupp22() returns the duplicate descriptor.

_S_e_e _A_l_s_o
dduupp(), lliibbcc, ssttddiioo.hh, uunniissttdd.hh
POSIX Standard, section 6.2.1

_D_i_a_g_n_o_s_t_i_c_s
dduupp22() returns a number less than  zero when an error occurs, such as a bad
file descriptor or no file descriptor available.
