Exclusively open a device file in Linux

view story

http://stackoverflow.com – 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? Thanks in advance! (HowTos)