fd_move(3)

fd_move3

Renumber a descriptor

Usage

#include <fd.h>

int fd_move(to,from);

int to;
int from;

Overview

fd_move moves descriptor from to descriptor to. If to was already open, fd_move closes it. If the move is successful, fd_move closes from. Exception: if to and from are the same number, fd_move does nothing.

fd_move returns 0 on success, -1 on error.

Releases

Unchanged in 4 releases since Debian 7 (Wheezy).

  1. 7–10

From qmail 1.06-6.2~deb10u1 in Debian 10 (Buster). Parsed by carta from the page's man source.