[sane-devel] Re: Bug on xsane 0.90 and help

Oliver Rauch oliver.rauch@rauch-domain.de
Wed, 16 Jul 2003 19:37:30 +0200


1) The problem with the inherited filedscriptor to the
html viewer is a backend related problem.
My prefered way is that the backend can be opened by
several frontends at the same time and it only does block
when a frontend starts the scan. If the backend can only be
opened by one frontend it may help to add your suggested
fcntl() function, but this must be done in the backend.

2) xsane can reduce the color depth from 48/16 bit to 24/8 bit.
Take a look at preferences->setup->image


On Wednesday 16 July 2003 18:56, you wrote:
> Hi, I'm a user of Xsane and I've had some problem with it.
> First, when it starts the browser to view the help, Xsane passes to it =
> file descriptor of scanner device file(or better, the browser inherits =
> from exec() ). When you open it, you should set the 'close-on-exec' fla=
> with fcntl(see its man page).
> This created some problem when I closed xsane and left the browser open=
> - I couldn't "rmmod scanner" to reinsert it with correct parameters lik=
> vendor and product ID, the module didn't autodetect my scanner even if
> those ID are present in the sources.
> - I wasn't able to restart xsane because the scanner was open, so busy,
> until I closed the browser. And finding that was not that easy(I used l=
> a luser wouldn't be able to).
> I'm not sure the second part is right, because I had various problems,
> however it is sensible that only one program at a time can open a scann=
> right? I've even given a look to kernel sources that seem to agree with=
> if (scn->isopen) {
>                 dbg("open_scanner(%d): Scanner device is already open",
> scn_minor);
>                 err =3D -EBUSY;
>                 goto out_error;
>         }
> Second, on my system, with a HP 3400C USB scanner, the "niash" backend =
> used(I didn't find a word in the docs about it). This backend doesn't
> support acquiring data with reduced color depth, so I wasn't able to se=
> it. Shouldn't xsane emulate in a general way the reduction of color-dep=
> with the ability to delegate it to the backend if it supports this?