Module libc/fcntl

libc/fcntl
Stability: unstable — a raw C binding, not a Yo design. `std/sys/constants` re-exports the `O_*` flags for the `std/fs` open path and `std/process/command` uses `O_NONBLOCK` / `FD_CLOEXEC` on the child pipes; those two are the supported surface. The values are per-platform, the set is additive-by-demand, and Windows has no `<fcntl.h>` in this shape at all — the CRT equivalents live in `std/libc/windows`, so a caller here is implicitly inside a POSIX arm. Freezing follows the `std/fs` open surface, not this file. — stable modules only change additively; this one may still change.

POSIX <fcntl.h> — file control options. Provides open flags and file control operations.

Stability

unstable — a raw C binding, not a Yo design. std/sys/constants re-exports the O_* flags for the std/fs open path and std/process/command uses O_NONBLOCK / FD_CLOEXEC on the child pipes; those two are the supported surface. The values are per-platform, the set is additive-by-demand, and Windows has no <fcntl.h> in this shape at all — the CRT equivalents live in std/libc/windows, so a caller here is implicitly inside a POSIX arm. Freezing follows the std/fs open surface, not this file.

Functions

fcntl function
fn(fd : int, cmd : int) -> int

Parameters

NameTypeNotes
fdint
cmdint

Returns: int

open function
fn(pathname : *(char), flags : int) -> int

Parameters

NameTypeNotes
pathname*(char)
flagsint

Returns: int

creat function
fn(pathname : *(char), mode : u32) -> int

Parameters

NameTypeNotes
pathname*(char)
modeu32

Returns: int

Constants

O_RDONLY constant i32

Value: <unknown: i32>

O_WRONLY constant i32

Value: <unknown: i32>

O_RDWR constant i32

Value: <unknown: i32>

O_CREAT constant i32

Value: <unknown: i32>

O_EXCL constant i32

Value: <unknown: i32>

O_TRUNC constant i32

Value: <unknown: i32>

O_APPEND constant i32

Value: <unknown: i32>

O_NONBLOCK constant i32

Value: <unknown: i32>

O_SYNC constant i32

Value: <unknown: i32>

O_DSYNC constant i32

Value: <unknown: i32>

O_CLOEXEC constant i32

Value: <unknown: i32>

O_DIRECTORY constant i32

Value: <unknown: i32>

O_NOFOLLOW constant i32

Value: <unknown: i32>

F_DUPFD constant int

Value: <unknown: int>

F_GETFD constant int

Value: <unknown: int>

F_SETFD constant int

Value: <unknown: int>

F_GETFL constant int

Value: <unknown: int>

F_SETFL constant int

Value: <unknown: int>

F_GETLK constant int

Value: <unknown: int>

F_SETLK constant int

Value: <unknown: int>

F_SETLKW constant int

Value: <unknown: int>

FD_CLOEXEC constant int

Value: <unknown: int>