Annotation of researchv10dc/man/man4/fd.4, revision 1.1.1.1

1.1       root        1: .TH FD 4
                      2: .CT 2 file_io 
                      3: .SH NAME
                      4: fd, stdin, stdout, stderr, tty \- file descriptor files
                      5: .SH DESCRIPTION
                      6: These files, conventionally called
                      7: .BR /dev/fd/\^0 ", " /dev/fd/1 ", ... " /dev/fd/127 ,
                      8: refer to files accessible through file descriptors.
                      9: If file descriptor
                     10: .I n
                     11: is open,
                     12: these two system calls have the same effect:
                     13: .IP
                     14: .EX
                     15: fd = open("/dev/fd/\fIn\fP", mode);
                     16: fd = dup(\fIn\fP\^);
                     17: .EE
                     18: .LP
                     19: On these devices
                     20: .I creat
                     21: (see
                     22: .IR open (2))
                     23: is equivalent to
                     24: .I open,
                     25: and
                     26: .I mode
                     27: is ignored.
                     28: As with
                     29: .IR dup ,
                     30: subsequent reads or writes on
                     31: .I fd
                     32: fail unless the original file descriptor
                     33: allows the operations.
                     34: .SH FILES
                     35: .TF /dev/stdout
                     36: .TP
                     37: .F /dev/fd/*
                     38: .TP
                     39: .F /dev/stdin
                     40: linked to
                     41: .F /dev/fd/0
                     42: .TP
                     43: .F /dev/stdout
                     44: linked to
                     45: .F /dev/fd/1
                     46: .TP
                     47: .F /dev/stderr
                     48: linked to
                     49: .F /dev/fd/2
                     50: .TP
                     51: .F /dev/tty
                     52: linked to
                     53: .F /dev/fd/3
                     54: .SH SEE ALSO
                     55: .IR open (2), 
                     56: .IR dup (2)
                     57: .SH DIAGNOSTICS
                     58: .I Open
                     59: returns \-1
                     60: and
                     61: .B EBADF
                     62: if the related file descriptor is not open
                     63: and in the appropriate mode (reading or writing).

unix.superglobalmegacorp.com

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