limb 0.2.0

2024-01-09

coe(3)
limb manual
coe(3)

NAME

coe, uncoe - ensure a file descriptor is/isn't close-on-exec ndelay_on, ndelay_off - ensure a file descriptor is/isn't in blocking mode

SYNOPSIS

#include <limb/djbunix.h>
int coe(int fd)
int uncoe(int fd)

int ndelay_on(int fd)
int ndelay_off(int fd)

DESCRIPTION

The coe() function ensures the file descriptor fd has the O_CLOEXEC flag set, setting it if needed.

The uncoe() function ensures the file descriptor fd has the O_CLOEXEC flag clear, clearing it if needed.

The ndelay_on() function ensures the file descriptor fd has the O_NONBLOCK flag set, setting it if needed.

The ndelay_off() function ensures the file descriptor fd has the O_NONBLOCK flag clear, clearing it if needed.

RETURN VALUE

On success, these functions return a value other than -1. Otherwise, they return -1 and set errno to indicate the error.

ERRORS

These functions may fail and set errno for any of the errors specified for fcntl(3) (with either F_GETFL or F_SETFL).

limb 0.1.0
2023-07-24
coe(3)