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

Figure out default socket addresses for POSIX systems that don't have XDG set up #36

Open
djdv opened this issue Jul 13, 2023 · 0 comments

Comments

@djdv
Copy link
Owner

djdv commented Jul 13, 2023

On systems like Linux, we're expecting $XDG_STATE_HOME to be set up and usable. If it's not, the default values for the daemon's socket is likely to fail with a message like this: daemon: could not listen on: /unix/home/user/.local/state/fs/server - mkdir /home/user/.local/state/fs: no such file or directory.
We should check for the existence of it first, and try to use it if it's there. And otherwise fall back to whatever common defaults exist.
I think the BSDs used to place these in /var/run, but we can probably just create our own thing in the home directory that get's cleaned up upon exit.

Long term, we shouldn't use Unix domain sockets as the defaults on systems that have better options.
I.e. name spaced sockets on Linux, named pipes on NT, etc.
This sidesteps dealing with the file system at all.

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

No branches or pull requests

1 participant