mirror of
https://github.com/BOINC/boinc.git
synced 2025-02-26 20:45:07 +00:00

Per-thread signal masking doesn't work in Android pre-4.1. As a result, the SIGALRM signals used by the BOINC runtime system, which are supposed to be handled by the worker thread, sometimes are handled by the timer thread. As a result, suspended apps never resume. Workaround: in the SIGALRM handler, see if we're the timer thread. If so, use pthread_kill() to send a SIGALRM to the work thread, and return.