.po 1i
.TH FCNTL 7 Bell
.V 08/15/84 17:37:23
.\" @[$]fcntl.7	1.4 08/15/84 17:37:23 - Zilog Inc.
.ad
.fi
.SH NAME
fcntl \- file control options
.SH SYNOPSIS
.B #include <fcntl.h>
.SH DESCRIPTION
The
.BR fcntl (2)
function provides for control over open files.
This include file describes
.I requests
and
.I arguments
to
.I fcntl
and
.BR open (2).
.PP
.nf
.ta .5i 1.38i 2i
/* Flag values accessible to open(2) and fcntl(2) */
/*  (The first three can only be set by open) */
#define    O_RDONLY    0
#define    O_WRONLY    1
#define    O_RDWR      2
#define    O_NDELAY    04       /* Non-blocking I/O */
#define    O_APPEND    010      /* append (writes guaranteed */
                                /*    at the end) */

/* Flag values accessible only to open(2) */
#define    O_CREAT     00400    /* open with file create */
                                /*   (uses third open arg)*/
#define    O_TRUNC     01000    /* open with truncation */
#define    O_EXCL      02000    /* exclusive open */

/* fcntl(2) requests */
#define    F_DUPFD     0        /* Duplicate fildes */
#define    F_GETFD     1        /* Get fildes flags */
#define    F_SETFD     2        /* Set fildes flags */
#define    F_GETFL     3        /* Get file flags */
#define    F_SETFL     4        /* Set file flags */
.fi
.SH SEE ALSO
fcntl(2),
open(2).
