kdup2 - specifically duplicate an existing khoros transport descriptor
LIBRARY CALL
int kdup2(
int id1,
int id2)
INPUT
id1 - the existing khoros transport descriptor to be dup'ed
id2 - the descriptor to be used for the newly dup'ed descriptor
OUTPUT
none
RETURN VALUE
the newly dup'ed descriptor on success, or -1 upon failure
DESCRIPTION
kdup2() is used to duplicate an existing khoros transport
descriptor. The "id1" is integer index in the process's
transport descriptor table. The new descriptor returned
will the specific one specified by "id2". If id2 is active
then it will be closed (kclose) before being dup'ed.
ADDITIONAL INFORMATION
none
EXAMPLES
none
SIDE EFFECTS
If too many descriptors are active then errno will be
set to EMFILE and -1 will be returned. If id is not
a valid or active descriptor then errno will be set to
EBADF and -1 will be returned.