[sane-devel] Closing file descriptors opened in sane_get_devices (was Re: [epson2] leaking file descriptors)

Alessandro Zummo azummo-lists at towertech.it
Thu Aug 29 09:38:44 UTC 2013


On Thu, 29 Aug 2013 16:53:56 +0900
Olaf Meeuwissen <olaf.meeuwissen at avasys.jp> wrote:

> In my particular scenario not closing the file descriptor would prevent
> an alternative backend from recognizing the device as supported if its
> sane_get_devices() is run after the epson2 one.  If their respective
> sane_get_devices() are called the other way around, both backends might
> be able to recognize the device as supported (if the alternative backend
> closes all its file descriptors).
> 
> So my question really boils down to whether backends must/should close
> any file descriptors opened as a result of calling sane_get_devices().

 As far as I can see, epson2 closes the device during attach, so it should
 be available to other backends.

-- 

 Best regards,

 Alessandro Zummo,
  Tower Technologies - Torino, Italy

  http://www.towertech.it




More information about the sane-devel mailing list