AT&T UNIX™PC Unix System V Users Manual - tenox
AT&T UNIX™PC Unix System V Users Manual - tenox AT&T UNIX™PC Unix System V Users Manual - tenox
CREAT (2) CREAT (2) file descriptor, is returned. Otherwise, a value of -1 is returned and errno is set to indicate the error. SEE ALSO close(2), dup(2), lseek(2), open(2), read(2), umask(2), write(2). - 2-
DUP (2) DUP (2) NAME dup - duplicate an open file descriptor SYNOPSIS int dup (fildes) int fildes; DESCRIPTION Fildes is a file descriptor obtained from a ere at, open, dup , fcntl, or pipe system call. Dup returns a new file descriptor having the following in common with the original: Same open file (or pipe). Same file pointer. (i.e., both file descriptors share one file pointer.) Same access mode (read, write or read/write). The new file descriptor is set to remain open across exec system calls. See fcntl(2). The file descriptor returned is the lowest one available. Dup will fail if one or more of the following are true: Fildes is not a valid open file descriptor. [EBADF[ Eighty (80) file descriptors are currently open. [EMFILE[ RETURN VALUE Upon successful completion a non-negative integer, namely the file descriptor, is returned. Otherwise, a value of -1 is returned and errno is set to indicate the error. SEE ALSO creat(2), close(2), exec(2), fcnt1(2), open(2), pipe(2). - 1 -
- Page 626 and 627: VI (l) VI (l) :set x? Show value of
- Page 628 and 629: VI (l) VI ( 1) mapped to I, then if
- Page 630 and 631: VI (l) VI (l) won't be broken. Inse
- Page 632 and 633: � I . .... .,_ J _ . . ·
- Page 634 and 635: .. \ '-�� -·
- Page 637 and 638: WIIO (I) WHO(l) NAME who - who is o
- Page 639: WRITE ( l ) WRITE ( l ) NAME write
- Page 642 and 643: XARGS(l) XARGS (l) -nnumber Execute
- Page 645 and 646: YACC { I ) YACC { l ) NAME yacc - y
- Page 647 and 648: INTRO ( 2) INTR0 ( 2 ) NAME intro -
- Page 649 and 650: INTRO ( 2) INTR0 (2) 21 EISDffi Is
- Page 651 and 652: INTRO (2) INTRO ( 2) ProcO is the s
- Page 653 and 654: INTR0 (2) INTR0 (2) permission requ
- Page 655 and 656: INTR0 (2) time_t shm_dtime; time_t
- Page 657: ACCESS (2} ACCESS (2} NAME access -
- Page 661 and 662: ALARM (2) ALARM (2) NAME alarm - se
- Page 663: BRK(2) BRK ( 2 ) NAME brk, sbrk - c
- Page 667 and 668: CHMOD (2) CHMOD (2) NAME chmod - ch
- Page 669: CHOWN(2) CHOWN(2) NAME chown - chan
- Page 673 and 674: CLOSE ( 2) CLOSE (2) NAME close - c
- Page 675: CREAT ( 2 ) CREAT ( 2 ) NAME creat
- Page 679 and 680: EXEC (2) EXEC (2) NAME execl, execv
- Page 681: EXEC (2) EXEC (2) Search perm1ss10n
- Page 684 and 685: EXIT (2) EXIT (2) WARNING See WARNI
- Page 686 and 687: FCNTL (2) FCNTL (2) immediately wit
- Page 689 and 690: FORK(2) FORK(2) NAME fork - create
- Page 691: GETPID ( 2} GETPID (2) NAME getpid,
- Page 694 and 695: I I I I I I I I I I I I I I I I I I
- Page 696 and 697: �-
- Page 699: LINK ( 2 ) LINK ( 2 ) NAME link - l
- Page 703 and 704: MKNOD (2) MKNOD (2) NAME mknod - ma
- Page 705: MOUNT (2) MOUNT (2) NAME mount - mo
- Page 708 and 709: MSGCTL(2) MSGCTL ( 2 ) user ID of t
- Page 710 and 711: MSGGET (2) MSGGET (2) SEE ALSO msgc
- Page 712 and 713: MSGOP ( 2) MSGOP (2) the calling pr
- Page 714 and 715: If)
- Page 717 and 718: OPEN ( 2 ) OPEN ( 2 ) NAME open - o
- Page 719: OPEN(2) OPEN(2) O_NDELAY is set, th
- Page 722 and 723: I�
- Page 725 and 726: PLOCK(2) PLOCK(2) NAME plock - lock
DUP (2) DUP (2)<br />
NAME<br />
dup - duplicate an open file descriptor<br />
SYNOPSIS<br />
int dup (fildes)<br />
int fildes;<br />
DESCRIPTION<br />
Fildes is a file descriptor obtained from a ere at, open, dup , fcntl,<br />
or pipe system call. Dup returns a new file descriptor having the<br />
following in common with the original:<br />
Same open file (or pipe).<br />
Same file pointer. (i.e., both file descriptors share one file<br />
pointer.)<br />
Same access mode (read, write or read/write).<br />
The new file descriptor is set to remain open across exec system<br />
calls. See fcntl(2).<br />
The file descriptor returned is the lowest one available.<br />
Dup will fail if one or more of the following are true:<br />
Fildes is not a valid open file descriptor. [EBADF[<br />
Eighty (80) file descriptors are currently open. [EMFILE[<br />
RETURN VALUE<br />
Upon successful completion a non-negative integer, namely the file<br />
descriptor, is returned. Otherwise, a value of -1 is returned and<br />
errno is set to indicate the error.<br />
SEE ALSO<br />
creat(2), close(2), exec(2), fcnt1(2), open(2), pipe(2).<br />
- 1 -