How is it possible to grab a device in C (let's say a mouse?) so that only a given process can use it?
For example it would allow the mouse to be used only on the current process.
I'm creation a virtual device and I write on "/dev/uinput" to send mouse movements. How can I restrict this virtual mouse to only one process.