SYSTEM CALLS dup2 - make another descriptor INVOCATION dup2( desc, new ) int desc; int new; EXPLANATION The descriptor is duplicated as descriptor . A close(2) is performed on if it was in use. RESULTS >=0 : The new descriptor. -1 : Error. REFERENCES close(2), dup(2), open(2)