54 lines
1.5 KiB
Groff
54 lines
1.5 KiB
Groff
.\" @(#)fcntl.5 1.1 94/10/31 SMI; from UCB 4.2
|
|
.TH FCNTL 5 "19 October 1987"
|
|
.SH NAME
|
|
fcntl \- file control options
|
|
.SH SYNOPSIS
|
|
.B "#include <fcntl.h>"
|
|
.SH DESCRIPTION
|
|
.IX "fcntl file" "" "\fLfcntl\fP \(em file control options"
|
|
.IX "file control" "options header file \(em \fLfcntl\fP"
|
|
The
|
|
.BR fcntl (2V)
|
|
function provides for control over open files. This include file describes
|
|
.I requests
|
|
and
|
|
.I arguments
|
|
to
|
|
.B fcntl
|
|
and
|
|
.BR open (2V)
|
|
as shown below:
|
|
.LP
|
|
.ta 1i 3i 4i
|
|
.nf
|
|
.ft B
|
|
/* @ (#)fcntl.h 1.2 83/12/08 SMI; from UCB 4.2 83/09/25 */
|
|
/*
|
|
* Flag values accessible to open(2V) and fcntl(2)
|
|
* (The first three can only be set by open)
|
|
*/
|
|
#define \s-1O_RDONLY\s0 0
|
|
#define \s-1O_WRONLY\s0 1
|
|
#define \s-1O_RDWR\s0 2
|
|
#define \s-1O_NDELAY FNDELAY\s0 /* Non-blocking I/O */
|
|
#define \s-1O_APPEND FAPPEND\s0 /* append (writes guaranteed at the end) */
|
|
#ifndef \s-1F_DUPFD\s0
|
|
/* fcntl(2) requests */
|
|
#define \s-1F_DUPFD\s0 0 /* Duplicate fildes */
|
|
#define \s-1F_GETFD\s0 1 /* Get fildes flags */
|
|
#define \s-1F_SETFD\s0 2 /* Set fildes flags */
|
|
#define \s-1F_GETFL\s0 3 /* Get file flags */
|
|
#define \s-1F_SETFL\s0 4 /* Set file flags */
|
|
#define \s-1F_GETOWN\s0 5 /* Get owner */
|
|
#define \s-1F_SETOWN\s0 6 /* Set owner */
|
|
/* flags for \s-1F_GETFL\s0, \s-1F_SETFL\s0\(em copied from <sys/file.h> */
|
|
#define \s-1FNDELAY\s0 00004 /* non-blocking reads */
|
|
#define \s-1FAPPEND\s0 00010 /* append on each write */
|
|
#define \s-1FASYNC\s0 00100 /* signal pgrp when data ready */
|
|
#endif
|
|
.fi
|
|
.ft R
|
|
.SH "SEE ALSO
|
|
.BR fcntl (2V),
|
|
.BR open (2V)
|