DUP [ Berkeley Sockets/iX Reference Manual ] MPE/iX 5.0 Documentation
Berkeley Sockets/iX Reference Manual
DUP
C Interface
int dup (s)
int s;
Description
This function returns a socket descriptor that refers to the same socket
as specified by s. Both descriptors can be used to reference the socket.
The new socket descriptor is the lowest numbered available socket
descriptor.
For more information about dup or any other POSIX function, refer to the
MPE/iX Developer's Kit Reference Manual, Volume 1.
Return Value
If the call is successful, a valid file descriptor referencing the socket
is returned. If it fails a -1 is returned, and an error code is stored
in errno.
Errors
[ENOTSOCK] The argument s is not a valid socket descriptor.
[ENOMEM] The process has no more descriptors available.
See Also
socket
MPE/iX 5.0 Documentation