Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LibCore: Socket takeover delimiter is too limiting #16436

Closed
ADKaster opened this issue Dec 11, 2022 · 2 comments · Fixed by #16506
Closed

LibCore: Socket takeover delimiter is too limiting #16436

ADKaster opened this issue Dec 11, 2022 · 2 comments · Fixed by #16506
Labels
bug Something isn't working enhancement New feature or request

Comments

@ADKaster
Copy link
Member

We currently allow processes to pass multiple socket paths in the SOCKET_TAKEOVER environment variable. The logic for pulling either a specific socket or the first socket uses ' ' as the delimiter between different sockets.

We ran into this with SQLServer on macOS, where the initial approach set the socket "name" as the path to the socket.

SOCKET_TAKEOVER=/path/to/socket:<socket_fd_number>

This works great until the path has a space in it, like /Users/me/Library/Application Support/SQLServer.socket.

A more robust delimiter between different socket name/fd pairs would probably be better, such as ;.

@ADKaster ADKaster added the enhancement New feature or request label Dec 11, 2022
@kleinesfilmroellchen
Copy link
Collaborator

kleinesfilmroellchen commented Dec 12, 2022

ah, the old 'spaces break 90% of path handling code' issue. I'd suggest : as that is the standard UNIX path separator, also used in $PATH for example. nvm I'm dumb, ; seems fine. Reminder to any implementor that this needs to be documented with the socket takeover mechanism.

@ADKaster
Copy link
Member Author

But we use : to separate the socket name from the FD already. It would be prudent to not re-use the same delimiter for different purposes.

@kleinesfilmroellchen kleinesfilmroellchen added the bug Something isn't working label Dec 12, 2022
trflynn89 pushed a commit that referenced this issue Dec 15, 2022
This allow to use socket path with spaces inside.

Closes #16436.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants