Query: dup
OS: hpux
Section: 2
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
dup(2) System Calls Manual dup(2)NAMEdup - duplicate an open file descriptorSYNOPSISDESCRIPTIONfildes is a file descriptor obtained from a or system call. returns a new file descriptor having the following in common with the origi- nal: o Same open file (or pipe). o Same file pointer (i.e., both file descriptors share one file pointer). o Same access mode (read, write or read/write). o Same file status flags (see fcntl(2), The new file descriptor is set to remain open across system calls. See fcntl(2). The file descriptor returned is the lowest one available.RETURN VALUEUpon successful completion, the file descriptor is returned as a non-negative integer. Otherwise, a value of -1 is returned and is set to indicate the error.ERRORSfails if one or more of the following is true: fildes is not a valid open file descriptor. Request violates the maximum number of open file descriptors.AUTHORwas developed by AT&T and HP.SEE ALSOclose(2), creat(2), dup2(2), exec(2), fcntl(2), open(2), pipe(2), privileges(5).STANDARDS CONFORMANCEdup(2)
Related Man Pages |
---|
dup2(2) - mojave |
dup2(2) - redhat |
dup(2) - hpux |
dup(2) - ultrix |
dup(2) - osx |
Similar Topics in the Unix Linux Community |
---|
File status - open/close ?? |
System calls? |
dup() |
Write/read to file descriptors |
vi does not open file properly.... |