Overview
| Artifact ID: | ce229000a57616188e6a8ac1ca868e3b81bcc1f00168ca2109f48b633a524344 |
|---|---|
| Ticket: | f4f44174e4c88a9132b19bcc4b68346a1d229fe1
protect notifier against signals |
| User & Date: | chw on 2018-05-26 21:23:24 |
Changes
- icomment:
TIP #509 brought me back to think over signal handling. I tried to direct signal delivery by using pthread_sigmask() in the this check-in: https://www.androwish.org/index.html/info/5cf69f01d7eca5a9 The idea is to have the notifier deal with signals, and no thread else. It requires to start the notifier thread on POSIX platforms as early as possible, in order to take over before any other threads are created. The main (and all later) threads have all signals blocked, except for the notifier. So far this seems to work as tested on various x86_64 Linuxen. However, function Tcl_AsyncMark() and friends still are subject to be re-thougt due to signal safety-ness of system calls being used (see the function list in http://man7.org/linux/man-pages/man7/signal-safety.7.html). And then there's TclX's "signal block|unblock" which should not alter the calling thread's sigmask, but needs to modify the notifier's one by using some inter-thread communication, which requires Tcl core changes.
- login: "chw"
- mimetype: "text/plain"