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

Create ipc socket for mpv correctly with mkstemp #43

Open
paulie-g opened this issue Mar 9, 2024 · 1 comment
Open

Create ipc socket for mpv correctly with mkstemp #43

paulie-g opened this issue Mar 9, 2024 · 1 comment

Comments

@paulie-g
Copy link

paulie-g commented Mar 9, 2024

Enhancement: Creating a socket with a fixed filename for mpv control, in $HOME/.config/invidtui no less, doesn't make sense. (If you wanted to do single instance enforcement, the way to do it would be with the standard PID file idiom.) Create the socket in env(TMPDIR) | '/tmp' + whatever you get back from the golang equivalent of mkdtemp. For bonus points, include the current PID in template. This way a crash doesn't require the user to manually remove the socket.

@darkhz
Copy link
Owner

darkhz commented Mar 9, 2024

Very good, this will be implemented.

Initially I did put the socket in /tmp, but later I put it in the config dir supposedly to better manage socket creation/detection/deletion, and also due to this #16 (comment).

Maybe multiple instances of invidtui could be allowed to run, each with its own socket.

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

2 participants