Skip to content

Commit 5f9cbef

Browse files
authored
Merge pull request #10 from mbuesch/fix-cloexec-bit
Fix the FD_CLOEXEC bit
2 parents 8c95a7e + a04e6fd commit 5f9cbef

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## [0.4.2] - 2024-04-22
4+
5+
### Changed
6+
7+
- `FD_CLOEXEC` bit mask definition fixed. The wrong definition effectively lead to `close-on-exec` flag not being set for all `listen_fds`.
8+
39
## [0.4.1] - 2022-08-31
410

511
### Changed

src/ffi.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ extern "C" {
55
pub const F_GETFD: i32 = 1;
66
pub const F_SETFD: i32 = 2;
77

8-
pub const FD_CLOEXEC: i32 = 2;
8+
pub const FD_CLOEXEC: i32 = 1;
99

1010
pub const EBADF: i32 = 9;

0 commit comments

Comments
 (0)