Linux / hidraw flock support?
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.
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.