dotnet/runtime

Support Socket.DuplicateAndClose through pidfd_getfd on Linux

Open

#113 701 ouverte le 19 mars 2025

Voir sur GitHub
 (9 commentaires) (0 réactions) (0 assignés)C# (5 445 forks)batch import
area-System.Net.Socketshelp wanted

Métriques du dépôt

Stars
 (17 886 stars)
Métriques de merge PR
 (Merge moyen 12j 11h) (661 PRs mergées en 30 j)

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.

Guide contributeur