-
Notifications
You must be signed in to change notification settings - Fork 5k
[Spike] Use Unix domain sockets in FileLockCommunicator #31856
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
Conversation
b330a46
to
0a3f978
Compare
// TODO: Where to put domain sockets? If we put them in gradleUserHomeDir, we can get | ||
// java.net.SocketException: Unix domain path too long | ||
File unixDomainSocketsDir = new File("/tmp/gradle"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm unsure where macOS expects them, but the Linux standard is to put these things in $XDG_RUNTIME_DIR
or failing that $TMPDIR
.
Looking at https://github.com/dirs-dev/directories-jvm/blob/main/src/main/java/dev/dirs/ProjectDirectories.java#L237, it seems like there's no equivalent directory for macOS/Windows.
So I think using $XDG_RUNTIME_DIR/gradle
on Linux if possible, and using the actual temporary directory ${java.io.tmpdir}/gradle
otherwise, would be the best option.
Relates to #31394