Problem with Tcl_AsyncCreate()
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

Problem with Tcl_AsyncCreate()

From: san <sandeep.gond@gmail.com>
Date: Mon Feb 27 2006 - 13:16:01 CET

Hi guys,

I am developing Tcl extension for signals.
I am having problem with the Tcl_AsyncCreate/Tcl_AsyncMark. My code is
as below:

handler(int sig)
{
Tcl_AsyncMark(token);
}

addsignal(sig)
{
...
Tcl_asynchandler token;
token = Tcl_AsyncCreate( handler_safe, (ClientData)&sig);
....
sigaction sa;
sa.sa_handler = handler;
}

handler_safe(ClientData cd, Tcl_Interp *interp, int code)
{
... handle the signal ....
}

If a signal occurs token should be set by handler and handler_safe will
be executed if in safe state.
I have a problem here. token is being set but handler_safe is not being
called at proper place...

What could be the problem. Please Help..
Received on Sun Apr 30 02:16:45 2006