On Mon, 2009-10-12 at 11:16 -0400, Alan Stern wrote: > > On Fri, 2009-10-09 at 21:59 -0400, Alan Stern wrote: > > > On Sat, 10 Oct 2009, Michael Thayer wrote: > > > > One question though - you mention > > > > that "The patch does not guarantee exclusive access to these devices; it > > > > is still possible for more than one program to open the device file > > > > concurrently". [Snip] > > > This was the subject of a discussion on LKML back at the time the patch > > > was being written. You might be able to find it in the archives. The > > > overall conclusion was that there already are mechanisms for this (like > > > O_EXCL) and the kernel doesn't need to get involved any further. [Snip] > In fact O_EXCL is not a good example. It applies only in conjunction > with O_CREAT -- it causes the open to fail if the file already exists. > Better examples would be the F_SETLK fcntl, flock, or lockf. Ah, a shame, if exclusive access requires mandatory locking then the new mechanism may not help us much, as we only have limited control over how the systems we run on are set up, and probably can't expect that to be available (not to mention that the glibc manpage claims that it is unreliable on Linux in any case). Thank you for all the clarifications though! Regards, Michael -- Sun Microsystems GmbH Michael Thayer Werkstrasse 24 VirtualBox engineer 71384 Weinstadt, Germany mailto:michael.thayer@xxxxxxx Sitz der Gesellschaft: Sun Microsystems GmbH, Sonnenallee 1, 85551 Kirchheim-Heimstetten Amtsgericht Muenchen: HRB 161028 Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels, Wolf Frenkel Vorsitzender des Aufsichtsrates: Martin Haering -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html