Skip to content

Commit

Permalink
coment
Browse files Browse the repository at this point in the history
  • Loading branch information
meowjesty committed Jul 23, 2024
1 parent c47a48a commit b4b2fba
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mirrord/layer/src/socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ pub(crate) static SOCKETS: LazyLock<DashMap<RawFd, Arc<UserSocket>>> = LazyLock:
})
.map(|(fds_and_sockets, _)| {
DashMap::from_iter(fds_and_sockets.into_iter().filter_map(|(fd, socket)| {
if unsafe{ FN_FCNTL(fd, libc::F_GETFD, 0) != -1} {
// Do not inherit sockets that are `FD_CLOEXEC`.
if unsafe { FN_FCNTL(fd, libc::F_GETFD, 0) != -1 } {
Some((fd, Arc::new(socket)))
} else {
None
Expand Down

0 comments on commit b4b2fba

Please sign in to comment.