[sane-devel] Using sanei_access: recommended or not?

Gerhard Jaeger gerhard at gjaeger.de
Tue Jan 24 08:24:49 UTC 2006


On Monday 23 January 2006 21:29, Lauri Pirttiaho wrote:
> Hello,
> 
> While writing the backend, I noticed so far only plustek
> backend seems to employ sanei_access for locking the
> device. Since in multi user systems it is possible
> that accidentally someone else might try to access a
> scanner in use, I think using the locking mechanism
> provided by sanei_access would make sense.
> 
> I added locking to my cs3200f backend and got it working
> quite easily and reliably (checked also automatic deletion
> of locks for the killed processes). SANE_DEBUG_SANEI_ACCESS=255
> was very helpful in figuring out the place of the lock file.
> 
> What are other's opinions about this? Should locking be
> a recommended practice?
> 
As I wrote the plustek backend and the locking stuff, I'd say:
YES, of course you have to use it ;)

Seriously, I needed that stuff, because of the built in button-
handling. Doing it that way, it was possible for more than one
backend to access the device without problems. And I think
it's a good thing on multiuser systems.

Just my 2 cents - if you got it working and you find it useful -
fine. The SANE standard does not enforce you to use this feature,
but I recommend it.

HTH
Gerhard





More information about the sane-devel mailing list