Bugs
Search the entire project
This project's trackers
This project's releases
Project
People
Skill
Advanced search
Log In
|
New Account
Home
My Page
Projects
Code Snippets
Project Openings
SANE - Scanner Access Now Easy
Summary
Activity
Tracker
Lists
SCM
Files
[#300620] plustek: driver hangs when pthreads are used.
View Trackers
|
Bugs
|
Download .csv
|
Monitor
Date:
2004-04-06 13:05
Priority:
3
State:
Closed
Submitted by:
Mattias Ellert (
ellert-guest
)
Assigned to:
Gerhard Jaeger (gja-guest)
Category:
backends (drivers)
Group:
Resolution:
Accepted
Summary:
plustek: driver hangs when pthreads are used.
Detailed description
The plustek driver hangs on platforms using pthreads (like e.g. MacOS X).
The reason for this has been identified as the following:
When the reader process is started with fork (like on linux), the file descriptors in the reader process are automatically closed when the reader process ends.
The read call in the main process then exits because the write end of the pipe was closed when the reader process exited.
However, when pthreads are used (like on MacOS X) the file descriptors are not closed when the reader thread ends, since in this case the file descriptors are shared between the threads.
The read call therefore never exits, since both ends of the pipe are still valid file descriptors.
(Note that this problem is not introduced by the workaround for the broken pthread_cancel call on MacOS X, but present on all platforms that uses threads.)
The attached patch has been tested and reportedly solves the problem.
For more information see the following thread on sane-devel:
http://lists.alioth.debian.org/pipermail/sane-devel/2004-April/010687.html
http://lists.alioth.debian.org/pipermail/sane-devel/2004-April/010698.html
http://lists.alioth.debian.org/pipermail/sane-devel/2004-April/010699.html
http://lists.alioth.debian.org/pipermail/sane-devel/2004-April/010701.html
http://lists.alioth.debian.org/pipermail/sane-devel/2004-April/010702.html
Followup
Message
Date: 2004-04-09 12:26
Sender:
Gerhard Jaeger
Logged In: YES user_id=2913Thanks for the report.
This bug is fixed in CVS now.
Attached Files:
Attachments:
sane-plustek.patch
Changes:
Field
Old Value
Date
By
status_id
Open
2004-04-09 12:26
gja-guest
Resolution
None
2004-04-09 12:26
gja-guest
close_date
2004-04-09 12:26
2004-04-09 12:26
gja-guest
assigned_to
none
2004-04-08 17:17
hmg-guest
File Added
65: sane-plustek.patch
2004-04-06 13:05
ellert-guest
Show source