Overview
| Artifact ID: | eb31e787d040876254b0a36ea42550f78c3fc817 |
|---|---|
| Ticket: | f4f44174e4c88a9132b19bcc4b68346a1d229fe1
protect notifier against signals |
| User & Date: | aspect on 2016-12-05 23:04:39 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
The following script (using Tclx) eventually hangs, as the signal is delivered either to the notifier thread or to Tcl_AlertNotifier. Patch coming. ~~~ package require Tclx package require Thread signal trap SIGHUP handler proc handler args { puts "SIGHUP [incr ::HUPS] in [thread::id] $args" } proc gotinput {chan} { gets $chan d puts "hupity $d" } set sub [thread::create thread::wait] lassign [chan pipe] r w chan configure $r -blocking 0 chan event $r readable [list gotinput $r] thread::transfer $sub $w thread::send $sub [list set wchan $w] thread::send -async $sub { package require Tclx set pid [pid] while 1 { kill HUP $pid puts $wchan [incr ::HUP] } } result vwait result ~~~ - foundin changed to: "trunk"
- is_private changed to: "0"
- login: "aspect"
- priority changed to: "5 Medium"
- private_contact changed to: "cb02a4a25e8da92f2790bc307bf01ef24ce6053e"
- resolution changed to: "None"
- severity changed to: "Minor"
- status changed to: "Open"
- submitter changed to: "aspect"
- subsystem changed to: "01. Notifier"
- title changed to: "protect notifier against signals"
- type changed to: "Bug"