Skip to content

Conversation

Keno
Copy link
Member

@Keno Keno commented Aug 24, 2025

Extracted from #59271, but I now have an independent use case. This allows libuv IOServers (unix domain servers, tcp servers, etc) to be passed as extra fd arguments to child processes.

@Keno Keno requested a review from vtjnash August 24, 2025 02:43
Extracted from #59271, but I now have an independent use case.
This allows libuv `IOServer`s (unix domain servers, tcp servers,
etc) to be passed as extra fd arguments to child processes.
@Keno Keno force-pushed the kf/extraserverfds branch from 9762521 to 458934f Compare August 24, 2025 07:23
@vtjnash vtjnash merged commit 6568124 into master Aug 25, 2025
7 checks passed
@vtjnash vtjnash deleted the kf/extraserverfds branch August 25, 2025 20:40
# Test passing a pipe server as an addition fd
@testset "Pipe server as additional fd" begin
if !Sys.iswindows()
# Windows CRT does not support passing server sockets as stdio fds
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume it is officially disallowed, but does it do any verification, or would the test pass if attempted? Since passing sockets at all is also officially documented as broken in the NT kernel due to various ancient design and implementation mistakes of long deprecated APIs around WSADuplicateSocket/DuplicateHandle, but it does mostly work (https://news.ycombinator.com/item?id=24969257)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

libuv checks and returns EOPNOTSUP. What would happen if you bypassed that, I do not know

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants