dotnet/runtime

Support Socket.DuplicateAndClose through pidfd_getfd on Linux

オープン

#113,701 opened on 2025/03/19

 (9 件のコメント) (0 件のリアクション) (0 人の担当者)C# (5,445 件のフォーク)batch import
area-System.Net.Socketshelp wanted

Repository metrics

Stars
 (17,886 個のスター)
PR merge metrics
 (平均マージ 12d 11h) (30d で 661 merged PRs)

説明

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.

コントリビューターガイド