Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ fcntl(5) — HP-UX 6.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

fcntl(2)

open(2)

FCNTL(5)  —  HP-UX

NAME

fcntl − file control options

SYNOPSIS

#include <fcntl.h>

DESCRIPTION

The fcntl(2) function provides for control over open files. This include file describes requests and arguments to fcntl and open(2).

/∗ 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)
*/

#define O_SYNCIO 0100000 /∗ Do write through caching ∗/

/∗ 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 ∗/
#define F_GETLK 5 /∗ Get blocking file lock ∗/
#define F_SETLK 6 /∗ Set or clear file locks and fail on busy ∗/
#define F_SETLKW 7 /∗ Set or clear file locks and wait on busy
∗/

/∗ file segment locking control structure ∗/ struct flock {

short l_type;
short l_whence;
long l_start;
long l_len;
int l_pid;

}; /∗ file segment locking types ∗/

#define F_RDLCK 01 /∗ Read lock ∗/
#define F_WRLCK 02 /∗ Write lock ∗/
#define F_UNLCK 03 /∗ Remove locks ∗/

DEPENDENCIES

Series 500
The F_GETLK, F_SETLK, and F_SETLKW commands are not supported.

SEE ALSO

fcntl(2), open(2). 

Hewlett-Packard Company  —  Version B.1,  May 11, 2021

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026