GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
CLOSEFROM(2) FreeBSD System Calls Manual CLOSEFROM(2)

closefrom, close_range
delete open file descriptors

Standard C Library (libc, -lc)

#include <unistd.h>

void
closefrom(int lowfd);

int
close_range(u_int lowfd, u_int highfd, int flags);

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.

The close_range() system call deletes all open file descriptors between lowfd and highfd inclusive, clamped to the range of open file descriptors. Any errors encountered while closing file descriptors are ignored. Supported flags:

Set the close-on-exec flag on descriptors in the range instead of closing them.

Upon successful completion, close_range() returns a value of 0. Otherwise, a value of -1 is returned and the global variable errno is set to indicate the error.

The close_range() system call will fail if:
[]
The highfd argument is lower than the lowfd argument.
[]
An invalid flag was set.

close(2)

The closefrom() function first appeared in FreeBSD 8.0.
March 3, 2022 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 2 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.