Simulation of the DUP System call in Unix