limb 0.2.0

2024-01-09

allreadwrite.h(0)
limb manual
allreadwrite.h(0)

NAME

allreadwrite.h - safe I/O interface

SYNOPSIS

#include <limb/allreadwrite.h>

DESCRIPTION

The header defines the needed functions to perform safe I/O operations.

skalibs

This header is a complement to skalibs' own header, intended to be used as a "replacement". However, instead of re-inventing the wheel, it depends/includes skalibs' header, and some of the functions below are actually implemented in skalibs, or macros to such functions.

Low-level API

Note that you probably don't want/need to use the functions below, and should probably use a higher-level interface such as buffer.h(0).

Functions

The following functions/macros are defined :

allread(3)

Read from given file descriptor until requested length as been reached.

allreadv(3)

Similar to allread(3) but using vectors.

allwrite(3)

Write to given file descriptor until requested length as been reached.

allwritev(3)

Similar to allwrite(3) but using vectors.

allreadwrite(3)

Perform specified I/O operation until requested length as been reached.

allreadwritev(3)

Similar to allreadwrite(3) but using vectors.

fd_read(3)

Safe wrapper around read(3), i.e. can't be interrupted by signals.

fd_readv(3)

Safe wrapper around readv(3), i.e. can't be interrupted by signals.

fd_write(3)

Safe wrapper around write(3), i.e. can't be interrupted by signals.

fd_writev(3)

Safe wrapper around writev(3), i.e. can't be interrupted by signals.

sanitize_read(3)

Sanitize return code from functions such as read(3).

unsanitize_read(3)

Reverse the operation performed by sanitize_read(3).

limb 0.1.0
2023-07-24
allreadwrite.h(0)