Releases: cptpcrd/close_fds
Releases · cptpcrd/close_fds
v0.3.2
- perf: use
close_range(..., CLOSE_RANGE_CLOEXEC)more inset_fds_cloexec()on Linux - refactor: improve
close_range()presence check on FreeBSD - feat: read
/dev/fdon iOS, just like on macOS - Add basic example of use with a Command
- perf: on Linux, cache whether we're running on WSL 1
- perf: improve performance of slow loop fallback
- feat: add new "builders" to further customize behavior
- fix: correct
getdents()link name on NetBSD - Major internal refactors
- Improved tests and documentation
v0.3.1
v0.3.0
Changelog:
- refactor: add "thread-safe" versions of certain functions
- perf(close): add translation step to simplify
minfd/keep_fdsspecification - perf(fditer): override
FdIter::min()andFditer::max()for efficiency - ci: build for more supported targets
- feat(fditer): expose "possible" status of an
FdIter - fix: fix internal bugs
- refactor: major internal refactoring
- doc: improved documentation (and warnings)
- test: improved tests
v0.2.2
Changelog
- Remove Windows support
- It unnecessarily complicates portions of the code, especially the testing code.
- It may require users to set an "invalid parameter handler" for it to work properly. Most probably won't realize this and will be confused to see their programs segfault.
- The real killer: Windows handles file descriptors differently, and a function that closes all file descriptors just isn't necessary for security on Windows.
The way I understand it, only file descriptors 0, 1, and 2 are ever inherited across program launches. File handles are inherited by default, but we can't close them.
- Implement
size_hint()forFdIter - Add warnings to the docs of
iter_open_fds()anditer_possible_fds() - Add Solaris/Illumos support
- Ensure
FdIteris fused and mark it as such - Minor internal refactoring
v0.2.1
CHANGELOG:
- Add new (Unix-only)
set_fds_cloexec()helper - FreeBSD: Don't use the
kern.proc.nfdssysctl fromclose_open_fds()(sinceclosefrom()can be used to provide a performance boost on the BSDs, andkern.proc.nfdsmay actually slow that down) - Internal reorganization
- Improved documentation
v0.2.0
Changelog
- Improve efficiency of
close_open_fds()if keep_fds is sorted - Add Windows support (closes file descriptors only, not file handles)
- Disable
/proc/self/fdcheck on WSL 1, where it's broken (it works on WSL 2) - Open all file descriptors as
O_CLOEXEC(just in case) - Make tests stricter