dotnet/runtime

Support Socket.DuplicateAndClose through pidfd_getfd on Linux

Open

#113.701 aperta il 19 mar 2025

Vedi su GitHub
 (9 commenti) (0 reazioni) (0 assegnatari)C# (5445 fork)batch import
area-System.Net.Socketshelp wanted

Metriche repository

Star
 (17.886 star)
Metriche merge PR
 (Merge medio 12g 11h) (661 PR mergiate in 30 g)

Descrizione

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.

Guida contributor