dotnet/runtime

Support Socket.DuplicateAndClose through pidfd_getfd on Linux

开放

#113,701 创建于 2025年3月19日

 (9 条评论) (0 个反应) (0 位负责人)C# (5,445 个派生)batch import
area-System.Net.Socketshelp wanted

仓库指标

星标
 (17,886 个星标)
PR 合并指标
 (平均合并 12天 11小时) (30 天内合并 661 个 PR)

描述

Related: https://github.com/dotnet/runtime/issues/1760

Syscall: https://man7.org/linux/man-pages/man2/pidfd_getfd.2.html

It should be possible to use this syscall to implement DuplicateAndClose, it seems with it Linux no longer fundamentally differs from Windows' WSADuplicateSocket. Though I can imagine the ptrace permission requirement may be problematic.

贡献者指南