[sane-devel] scanimage hangs at shutdown (Preparing for a sane-backends release)

Rolf Bensch rolf at bensch-online.de
Tue Aug 18 11:07:20 UTC 2015

Using fork or pthread makes no difference.

A sleep at the end of main() works wonders.

But not for the other exit() functions. 'scanimage -h' or 'scanimage -A'
still hang with the same issue.

I suggest to replace atexit and all exit() functions by the existing
scanimage_exit() function.

Please check if attached patch is running with your installations.


Am 18.08.2015 um 03:31 schrieb m. allan noah:
> Good point. Rolf- any chance you could insert a sleep at the end of
> main()? Also, does the backend in question use fork() on this distro?
> allan
> On Mon, Aug 17, 2015 at 8:30 PM, Olaf Meeuwissen
> <olaf.meeuwissen at avasys.jp> wrote:
>> m. allan noah writes:
>>> I don't understand. Registered atexit handlers should be called when
>>> main() returns, which is after sane_cancel. What version of
>>> libusb-compat is in use?
>> Please remember that sane_cancel() only *initiates* cancellation.  So
>> cancellation may not have finished yet when main() returns.  I'm not
>> sure if this is causing the problem but thought I'd mention it anyway.
>> Hope this helps,
>> --
>> Olaf Meeuwissen, LPIC-2     FLOSS Engineer -- EPSON AVASYS CORPORATION
>> FSF Associate Member #1962               Help support software freedom
>>                  http://www.fsf.org/jf?referrer=1962
-------------- next part --------------
A non-text attachment was scrubbed...
Name: scanimage.c.patch
Type: text/x-diff
Size: 7317 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20150818/d89a00f8/attachment-0001.patch>

More information about the sane-devel mailing list