closefrom(3bsd)

closefrom3bsd

Delete open file descriptors

Usage

#include <unistd.h>

(See libbsd(7) for include usage.)

void

closefrom(int lowfd);

Library

library “libbsd”

Overview

The closefrom() system call deletes all open file descriptors greater than or equal to lowfd from the per-process object reference table. Any errors encountered while closing file descriptors are ignored.

Releases

5 releases since Debian 10 (Buster); the text changed 3 times.

  1. 10
  2. 11
  3. 12
  4. 13–Arch

Standards

closefrom() is a BSD and Solaris extension.

History

The closefrom() function first appeared in Solaris 9, OpenBSD 3.5, DragonFly 1.2, NetBSD 3.0, FreeBSD 8.0 and glibc 2.34.

From libbsd 0.12.2-2 in Arch Linux 2026-11-01. Parsed by carta from the page's mdoc source.