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.

貢獻者指南