limb 0.2.0

2024-01-09

fd_write(3)
limb manual
fd_write(3)

NAME

fd_write, fd_writev - safe wrappers for writing files

SYNOPSIS

#include <limb/allreadwrite.h>
ssize_t fd_write(int fd, char *dst, size_t dlen)
ssize_t fd_writev(int fd, const struct iovec *v, unsigned n)

DESCRIPTION

The fd_write() function is a safe wrapper around write(3), i.e. it cannot be interrupted by signals. More precisely, if write(3) fails with EINTR it is automatically called again until it succeeds or fails with another error.

The fd_writev() function is similar, but around writev(3).

RETURN VALUE

These functions return the number of bytes written to fd on success. Otherwise they return -1 and set errno to indicate the error.

ERRORS

The fd_write() and fd_writev() functions may fail and set errno for any of the errors described for write(3) and writev(3), respectively, except for EINTR.

limb 0.1.0
2023-07-24
fd_write(3)