Crate close_fds[][src]

Structs

FdIter

An iterator over the current process’s file descriptors.

Functions

close_open_fds

Close all open file descriptors starting at minfd, except for the file descriptors in keep_fds.

iter_open_fds

Iterate over all open file descriptors for the current process, starting at minfd. The file descriptors are guaranteed to be returned in ascending order.

iter_open_fds_threadsafe

Equivalent to iter_open_fds(), but behaves more reliably in multithreaded programs (at the cost of decreased performance on some platforms).

iter_possible_fds

Identical to iter_open_fds(), but may – for efficiency – yield invalid file descriptors.

iter_possible_fds_threadsafe

Equivalent to iter_possible_fds(), but behaves more reliably in multithreaded programs (at the cost of decreased performance on some platforms).

set_fds_cloexec

Identical to close_open_fds(), but sets the FD_CLOEXEC flag on the file descriptors instead of closing them.

set_fds_cloexec_threadsafe

Equivalent to set_fds_cloexec(), but behaves more reliably in multithreaded programs (at the cost of decreased performance on some platforms).