dotnet/runtime

Support Socket.DuplicateAndClose through pidfd_getfd on Linux

Open

#113.701 aberto em 19 de mar. de 2025

Ver no GitHub
 (9 comments) (0 reactions) (0 assignees)C# (5.445 forks)batch import
area-System.Net.Socketshelp wanted

Métricas do repositório

Stars
 (17.886 stars)
Métricas de merge de PR
 (Mesclagem média 12d 11h) (661 fundiu PRs em 30d)

Description

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.

Guia do colaborador