How to open a device for exclusive access?

Steven W. Orr steveo at syslang.net
Sun Jul 15 16:35:22 EDT 2007


On Sunday, Jul 15th 2007 at 13:12 -0400, quoth Ben Scott:

=>On 7/15/07, Bill Sconce <sconce at in-spec-inc.com> wrote:
=>> A first-blush hope of a Pythonista might be to write a small
=>> program which handles data going to and from the device, and
=>> have upstream processes which need the device communicate with
=>> that program ...
=>
=>  Such a program is called a "device driver" in most circles.  :)
=>
=>  I've often wondered why, after 30+ years of *nix, there's still no
=>good way to handle locking/contention in the filesystem.  Linux, KDE,
=>GNOME, etc., have shown that the *nix community is willing to jettison
=>"Unix tradition" when there's an obvious gain to be had.  But it seems
=>like file(ish) locking is one of the holdouts.

On the one hand I agree, but on the other, my particular problem would be 
solved if the char device I was trying to open would only honor O_EXCL. 
That's really the root of the problem. If that was implemented as a 
generally useable flag, it would probably solve a lot of people's 
problems.

-- 
Time flies like the wind. Fruit flies like a banana. Stranger things have  .0.
happened but none stranger than this. Does your driver's license say Organ ..0
Donor?Black holes are where God divided by zero. Listen to me! We are all- 000
individuals! What if this weren't a hypothetical question?
steveo at syslang.net


More information about the gnhlug-discuss mailing list