closefrom(3bsd) 3bsd closefrom(3bsd)

# [NAME](#NAME)

`closefrom` — delete open file descriptors

# [LIBRARY](#LIBRARY)

library “libbsd”

# [SYNOPSIS](#SYNOPSIS)

`#include <unistd.h>` (See [libbsd(7)](/man/os/libbsd/libbsd.7) for include usage.)  
`void`  
`closefrom`(`int lowfd`);

# [DESCRIPTION](#DESCRIPTION)

The [`closefrom`](#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.

# [SEE ALSO](#SEE_ALSO)

[close(2)](/man/os/libbsd/close.2)

# [STANDARDS](#STANDARDS)

`closefrom`() is a BSD and Solaris extension.

# [HISTORY](#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.

June 12, 2009 Linux 4.19.0-gvisor

---

Document: closefrom(3bsd) from libbsd 0.12.2-r9 (Chainguard OS)
Source: https://gitlab.freedesktop.org/libbsd/libbsd
