- Method dup2
Duplicate a file over another.
This function works similarly to
assign(), but instead of making the argument a reference to the same file, it creates a new file with the same properties and places it in the argument.
1on success and
0(zero) on failure.
toneed not be open, in which case a new fd is allocated.
Note also that
tois also assigned to the same backend (if any) as this object.
- See also