Skip to content

Conversation

@dsh0416
Copy link

@dsh0416 dsh0416 commented May 27, 2025

No description provided.

@samuel-williams-shopify
Copy link
Contributor

samuel-williams-shopify commented May 30, 2025

We cannot use the implementation that changes the current working directory for the process because it's likely to cause unexpected behaviour for any code that's using relative file paths at the same time.

I suggest using a different approach. If the path is too long, construct a temporary socket path, e.g. $tmpdir/$checksum.ipc where $checksum is derived from the original path in a consistent way. Then, use that for bind and connect. In addition, create a symlink from the original path to the temporary socket path. This should be sufficient to have the same visible effects but allows us to use a shorter path for the socket address.

There are some other options like bindat/connectat but these are not standardised system calls unfortunately.

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