[sane-devel] All sane frontends segfault with my HP 5200C
Henning Meier-Geinitz
henning at meier-geinitz.de
Sat Feb 9 20:35:51 GMT 2002
Hi,
On Sun, Feb 03, 2002 at 01:06:12PM -0500, Douglas Gilbert wrote:
> Just a suggestion ... once SANE spots a SCSI, USB, parport
> etc. scanner it should hold open a file descriptor to it. If
> the scanner is hot unplugged you should get a sensible
> error message next time you try to access it (e.g. ENODEV).
> By keeping a fd open to a device the module subsystem
> (or the user) is inhibited from "autocleaning" the module
> away. If that happens then the next time you open /dev/sg2
> (for example) it may not be the scanner you expect it to
> be! SANE could then have a high level function to rescan
> for devices. Hooks could also be added so hotplug (and unplug)
> alerts could be consumed sensibly. A common case would be
> users power cycling their scanners.
One problem with this is that you can't have two backends that support
the same scanner. The first backend will open the device and keep it
open so the other backend has no chance to check the device.
But I will try if it can be done.
Bye,
Henning
More information about the sane-devel
mailing list