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

Linux / hidraw flock support? #660

Open
ghost opened this issue Feb 22, 2024 · 1 comment
Open

Linux / hidraw flock support? #660

ghost opened this issue Feb 22, 2024 · 1 comment
Labels
enhancement New feature or request hidraw Related to Linux/hidraw backend

Comments

@ghost
Copy link

ghost commented Feb 22, 2024

I have seen other applications using flock on their open hidraw file descriptors to open them exclusively. This is not the default for hidapi but I am not asking for this to change. I was thinking it might be a good idea to use flock to acquire a shared lock so hidapi applications won't conflict with other applications using flock with an exclusive lock while still allowing hidraw devices to be opened concurrently with other applications that are also using a shared lock.

Would this be useful at all to implement? It's not particularly hard to do.

@Youw Youw added enhancement New feature or request hidraw Related to Linux/hidraw backend labels Feb 22, 2024
@Youw
Copy link
Member

Youw commented Feb 22, 2024

Maybe it is.
In any cases this sounds like something that might be implemented as platform-specific extension, in similar way as it is done for macOS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hidraw Related to Linux/hidraw backend
Projects
None yet
Development

No branches or pull requests

1 participant