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

2015-08-21 Thread Rolf Bensch
Hi Olaf, I removed atexit() from scanimage and comitted the patch last night. Now scanimage doesn't hang anymore under OpenSuse with libusb-compat. Cheers, Rolf Am 20.08.2015 um 01:09 schrieb Olaf Meeuwissen: Hi Rolf, Rolf Bensch writes: Hi Olaf, Am 19.08.2015 um 03:27 schrieb Olaf

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

2015-08-19 Thread Olaf Meeuwissen
Hi Rolf, Rolf Bensch writes: Hi Olaf, Am 19.08.2015 um 03:27 schrieb Olaf Meeuwissen: Rolf Bensch writes: 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

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

2015-08-19 Thread Rolf Bensch
Hi Olaf, Good idea, but it doesn't work. Many thanks for your help. Cheers, Rolf Am 19.08.2015 um 03:27 schrieb Olaf Meeuwissen: Rolf Bensch writes: Using fork or pthread makes no difference. A sleep at the end of main() works wonders. But not for the other exit() functions.

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

2015-08-18 Thread Rolf Bensch
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

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

2015-08-18 Thread Olaf Meeuwissen
Rolf Bensch writes: 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

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

2015-08-17 Thread Rolf Bensch
It's not the described bug in libusb-compat. However, atexit() isn't working as desired in OpenSuse. scanimage closes the usb interface from atexit() *before* sane_cancel() is ready at the end of main(). Is this a problem of OpenSuse or should somebody rewrite the shutdown sequence of

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

2015-08-17 Thread 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.meeuwis...@avasys.jp wrote: m. allan noah writes: I don't understand. Registered atexit

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

2015-08-17 Thread Olaf Meeuwissen
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

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

2015-08-17 Thread m. allan noah
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? allan On Mon, Aug 17, 2015 at 6:57 AM, Rolf Bensch r...@bensch-online.de wrote: It's not the described bug in libusb-compat. However,