Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
dup2 z/OS Using REXX and z/OS UNIX System Services SA23-2283-00 |
|
Functiondup2 invokes the fcntl callable service to duplicate an open file descriptor to the file descriptor of choice. The file descriptor returned is equal to fd2. If fd2 is already in use, it is closed and fd is duplicated. If fd is equal to fd2, fd2 is returned without closing it. The file descriptor is returned in RETVAL. Parameters
Usage notesdup fd fd2 is equivalent to F_DUPFD fd fd2. ExampleIn the following example, assume that fd1 and fd2 were
assigned values earlier in the exec:
|
Copyright IBM Corporation 1990, 2014
|