Re: TclX on Windows - anybody successfully trap SIGTERM / SIGKILL
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

Re: TclX on Windows - anybody successfully trap SIGTERM / SIGKILL

From: David Gravereaux <davygrvy@pobox.com>
Date: Fri Dec 30 2005 - 10:27:26 CET

On Fri, 30 Dec 2005 09:32:30 +0100, Uwe Klein
<uwe_klein_habertwedt@t-online.de> wrote:

>> Here's why I think this.. To properly "trap" a signal I need to
>> assume the event loop is running. I think that's a bad asumption to
>> make for everyone by placing this code in the shell itself.
>
>but where is the difference to things like fileevent?

By taking the responsibility to install a handler, I should be certain
that when I call Tcl_AsyncMark, the queued event will get serviced. If
it doesn't get serviced, the blocking with Tcl_ConditionWait for the
return value to exit the handler will block the OS supplied thread for
infinity.

I could do a timeout I guess... Ok, this is probably workable but
tclsh would require a threaded build or... I'll just use a native
event object..
Received on Tue Jan 3 03:09:46 2006