I think I have a straightforward solution to the problem described, at https://core.tcl.tk/tcl/tktview/f4f44174
. If you have a better test case, please attach it to that ticket.
I'm working on a more ambitious project to teach the core about proper signal handling (and eventually SIGCHLD), but this will mess with Tclx and probably require a TIP + waiting for Tcl9. I'll keep you informed as that becomes more concrete, as supporting your use-case is a relevant concern.
I think I have a straightforward solution to the problem described, at https://core.tcl.tk/tcl/tktview/f4f44174 . If you have a better test case, please attach it to that ticket.
I'm working on a more ambitious project to teach the core about proper signal handling (and eventually SIGCHLD), but this will mess with Tclx and probably require a TIP + waiting for Tcl9. I'll keep you informed as that becomes more concrete, as supporting your use-case is a relevant concern.