What ways are there available, for exclusively opening a device file (say, the display frame buffer)?
[Info: I already know about flock() & friends, which have an effect only when the other applications are also using it (in other words: open() will succeed but flock() will fail if already locked) --> but still the device handle retrieved from open() can be used to write to the display..]
What about cases when I want to enforce such an exclusive access on a device files? How would such an enforcement be possible?
mandatory locking linuxwhich has many issues...flock(), otherwise it doesn't prevent writing. The only way to restrict exclusive opens on devices automatically is to have the device driver performopenreference counts itself.