Skip to content

Commit

Permalink
Merge pull request #10 from mbuesch/fix-cloexec-bit
Browse files Browse the repository at this point in the history
Fix the FD_CLOEXEC bit
  • Loading branch information
lnicola authored Apr 22, 2024
2 parents 8c95a7e + a04e6fd commit 5f9cbef
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [0.4.2] - 2024-04-22

### Changed

- `FD_CLOEXEC` bit mask definition fixed. The wrong definition effectively lead to `close-on-exec` flag not being set for all `listen_fds`.

## [0.4.1] - 2022-08-31

### Changed
Expand Down
2 changes: 1 addition & 1 deletion src/ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ extern "C" {
pub const F_GETFD: i32 = 1;
pub const F_SETFD: i32 = 2;

pub const FD_CLOEXEC: i32 = 2;
pub const FD_CLOEXEC: i32 = 1;

pub const EBADF: i32 = 9;

0 comments on commit 5f9cbef

Please sign in to comment.