[sane-devel] scan can not be stopped: possible problems with sanei_thread?
Oliver.Rauch at Rauch-Domain.DE
Sat Sep 15 15:49:05 UTC 2007
After an update to the cvs version of sane-backends I released that it
is not possible to stop a scan or a preview scan any more with the umax
backend. This is tested with scanimage and xsane.
AFAIR I did not make any changes relevant to this points in the umax
backend or in xsane. (And scanimage has the same problem).
To stop a scan in the umax backend the function sane_cancel calls
do_cancel that uses sanei_thread to kill the reader process and waits
for the reader process. But sanei_thread_waitpid() never returns.
Here is the relevant code in do_cancel:
static SANE_Status do_cancel(Umax_Scanner *scanner)
int pid, status;
scanner->scanning = SANE_FALSE;
if (scanner->reader_pid > 0)
pid = sanei_thread_waitpid(scanner->reader_pid, &status);
Does anyone remember a change that could have caused this problem?
Does anyone has also problems to stop a scan or preview scan?
Does anyone know from which sane-backends version it stopped working?
Note: USE_PTHREAD is not defined
More information about the sane-devel