CTRL-C does not cancel scanning completely
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
HPLIP |
New
|
Undecided
|
Unassigned |
Bug Description
See
https:/
Using HPLIP 3.10.2 with my HP LaserJet 1220 all-in-one
I let it pull in the paper, scan a bit and then I press CTRL-C:
-------
user@host:/tmp $ scanimage \
-d hpaio:/
^Cscanimage: received signal 2
scanimage: trying to stop scanner
-------
After several seconds, the HP LaserJet 1220 ejects the paper
but scanimage still hangs.
I need to do as root "kill -9 <PID_of_
to get it finally terminated.
In contrast for e.g. my Canon CanoScan N1240U/LiDE30
which uses the "plustek" driver in sane-backends it works:
-------
user@host:/tmp $ scanimage -d plustek:
^Cscanimage: received signal 2
scanimage: trying to stop scanner
scanimage: sane_read: Operation was cancelled
user@host:/tmp $
-------
A more detailed analysis for the hpaio backend shows
that while it hangs after a CTRL-C, it is actually hanging
in a "futex(...)" system call which is perhaps the result
of a pthread_mutex_lock call in the hpaio driver
or of such a call in whatever lower-level library, see
https:/
for details.
I guess that the hpaio backend should release a lock
when it gets a CTRL-C (i.e. SIGINT) or when whatever
termination signal is sent to it.