File:  [MW Coherent from dump] / coherent / a / usr / man / MULTI / dup2
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Wed May 29 04:56:34 2019 UTC (7 years ago) by root
Branches: MarkWilliams, MAIN
CVS tags: relic, HEAD
coherent



dup2()                 COHERENT System Call                dup2()




Duplicate a file descriptor

iinntt dduupp22(_f_d, _n_e_w_f_d) iinntt _f_d, _n_e_w_f_d;

dup2 duplicates  the file descriptor fd.   Unlike its cousin dup,
dup2 allows  you to specify  a new file  descriptor newfd, rather
than having the system select one.  If newfd is already open, the
system  closes it  before  assigning it  to the  new file.   dup2
returns the duplicate descriptor.

***** See Also *****

COHERENT system calls, dup(), STDIO

***** Diagnostics *****

dup2 returns  a number less than zero when  an error occurs, such
as a bad file descriptor or no file descriptor available.






































COHERENT Lexicon                                           Page 1



unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.