Overview
Artifact ID: | bcfcbb95ee1882cb86d9efcf5dc697fea3768fff |
---|---|
Ticket: | f4f44174e4c88a9132b19bcc4b68346a1d229fe1
protect notifier against signals |
User & Date: | aspect 2016-12-06 21:59:19 |
Changes
- icomment:
You are quite right. The only reason this prevented the hang is I used SIG_BLOCK after releasing the mutex rather than SIG_SETMASK. the pthread_mutex_lock() call in Tcl_AlertNotifier() was where gdb pointed when I observed the hang, but of course this is not the place to be blocking signals. The correct place seems to be Tcl_WaitForEvent() - the write() and select() calls in here being EINTR candidates. It looks like the write() could be wrapped in the moral equivalent of while (errno != EINTR) - and select() being interrupted probably won't hurt anyway - but blocking signals as long as we hold the mutex seems a bit tidier to me. Fixed patches added to the branch.
- login: "aspect"
- mimetype: "text/plain"