[#300602] Backends should not block SIGUSR2 when using sanei_thread on MacOS X

View Trackers | Bugs | Export CSV

2004-03-29 14:07
Submitted by:
Mattias Ellert (ellert-guest)
Assigned to:
Nobody (None)
Backends should not block SIGUSR2 when using sanei_thread on MacOS X

Detailed description
The pthread workaround uses a SIGUSR2 signal as a substitute for the broken pthread_cancel call on MacOS X. The backends therefore should not block the SIGUSR2 signal. The following backends can be fixed for this problem by applying the attached patch: avision, coolscan, pie, plustek, plustek_pp and u12. This list was obtained by finding all backends that uses the sanei_thread functions and calls sigfillset(), so it might not be complete.

This patch could be considered a temporary solution. The final solution should be to put all platform dependent stuff in sanei, and keep it out of the backends. This will however require some coordination in signal handling between the backends, which is not easy to achieve in the short term.

Followups: Sort comments antichronologically

Date: 2004-04-04 09:29
Sender: Mattias Ellert

Inloggad: JA user_id=2944One possible solution to this could be the following:

1. Make sure that every backend that defines a SIGTERM handler only does so when fork is used. (using e.g. sanei_thread_is_forked). This should maybe be done anyway.

2. Then change the pthread workaround from using SIGUSR2 to use SIGTERM instead. (If the previous point has been fully implemented there will be no conflicts.)

Then the existing code for blocking/unblocking the SIGTERM signal should work both for the fork case and the pthread workaround case.

Just an idea....
Date: 2004-06-20 01:19
Sender: Mattias Ellert

Inloggad: JA user_id=2944I have fixed this in the CVS now for the following backends: agfafocus, artec_eplus48u, avision, coolscan, fujitsu, pie, plustek, plustek_pp, sp15c, tamarack and u12. Closing bug report.

Attached Files:

Size Name Date By Download
3 KiBsane-SIGUSR2.patch2004-03-29 14:07ellert-guestsane-SIGUSR2.patch


Field Old Value Date By
status_idOpen2004-06-20 01:19ellert-guest
close_date2004-06-20 01:192004-06-20 01:19ellert-guest
File Added61: sane-SIGUSR2.patch2004-03-29 14:07ellert-guest
Powered By FusionForge