dup
Function
dup invokes the fcntl callable service to duplicate an open file descriptor. The file descriptor is returned in RETVAL.
Parameters
- fd
- An opened file descriptor (a number) to be duplicated.
Usage notes
dup fd is equivalent to F_DUPFD fd 0
.
Example
In the following example, assume that fd was assigned a value
earlier in the exec:
"dup (fd)"