*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->OpenBSD man pages -> stdout (4)              
Title
Content
Arch
Section
 

FD(4)

Contents


NAME    [Toc]    [Back]

     fd, stdin, stdout, stderr - file descriptor files

DESCRIPTION    [Toc]    [Back]

     The files /dev/fd/0 through /dev/fd/# refer to file descriptors which can
     be accessed through the file system.  If the file descriptor
is open and
     the mode the file is being opened with is a  subset  of  the
mode of the existing
 descriptor, the call:

           fd = open("/dev/fd/0", mode);

     and the call:

           fd = fcntl(0, F_DUPFD, 0);

     are equivalent.

     Opening  the  files /dev/stdin, /dev/stdout, and /dev/stderr
is equivalent
     to the following calls:

           fd = fcntl(STDIN_FILENO,  F_DUPFD, 0);
           fd = fcntl(STDOUT_FILENO, F_DUPFD, 0);
           fd = fcntl(STDERR_FILENO, F_DUPFD, 0);

     Flags to the open(2) call other than O_RDONLY, O_WRONLY, and
O_RDWR are
     ignored.

FILES    [Toc]    [Back]

     /dev/fd/#
     /dev/stdin
     /dev/stdout
     /dev/stderr

SEE ALSO    [Toc]    [Back]

      
      
     tty(4)

OpenBSD      3.6                           June      9,      1993
[ Back ]
 Similar pages
Name OS Title
pxfisatty IRIX Determines if file descriptor corresponds to a valid file descriptor
fattach Tru64 Attach a STREAMS-based file descriptor to a file in the file system name space
fdetach Tru64 Detach a STREAMS-based file descriptor from a file in the file system name space
AFopenfile IRIX allocate an AFfilehandle structure for an audio file identified by name / by a Unix file descriptor
AFidentifyfd IRIX retrieve the audio file format of a file descriptor / open AFfilehandle
AFgetfd IRIX get the Unix file descriptor for the file associated with an AFfilehandle structure
acl_set_fd Tru64 Sets the ACL on the file or directory designated by the file descriptor
isfdtype Tru64 Test a file descriptor for a specific file type
isastream Tru64 Determine if a file descriptor refers to a STREAMS file
fdetach Tru64 Detaches a STREAMS-based file descriptor from a file
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service