Functions HI-TECH C DUP
#include <unixio.h> int dup(int fd)
Given a file descriptor, such as returned by open(), this routine will return another file descriptor which will refer to the same open file. -1 is returned if the fd argument is a bad descriptor or does not refer to an open file.
open, close, creat, read, write