Am Dienstag, 18. April 2006 17:10 schrieb Alan Stern:
> > all of them open it with O_EXCL?
> >
> > does O_EXCL not work standalone? should I use flock or something like
> > that instead to prevent several processes accessing the same file?
> > Or are usb device file somehow special and those methods do not work?
>
> Take a look at "man 2 open".  It says that O_EXCL doesn't do anything
> unless you use it along with O_CREAT, in which case you get an error if
> the file already exists.  So I guess you really don't want to use O_EXCL.

ok, thanks. my man page copy didn't write anything about O_EXCL without
O_CREAT in detail leaving only room for speculation-

> You should look at the man pages for flock, fcntl, and lockf.

thanks, will implement the desired effect that way.

as alternative, I can use usb functions to claim the interface.
would that also have the desired effect? it might be even better,
as it would allow devices with several integrated components to be
locked only on the endpoint I use, and leave the others open for
other software to use those components.

but will claim interface work on the control interface? many tokens
use vendor defined control interrupt sequences :I(

thanks for your help!

Regards, Andreas


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to