Message31087
What I dislike about #1564547 is the introduction of the pipe. I don't think this is an appropriate change, and unnecessary to fix the problems discussed here. So if one of the patches is dropped, I'd rather drop #1564547.
Also, I don't think it is necessary to set .tripped after Py_AddPendingCall. If there is a CheckSignals invocation already going on, it will invoke the handler just fine. What *is* necessary (IMO) is to set is_tripped after setting .tripped: Otherwise, an in-progress CheckSignals call might clear is_tripped before .tripped gets set, and thus not invoke the signal handler. The subsequent CheckSignals would quit early because is_tripped is not set.
So I think "a" right sequence is
Handlers[SIGINT].tripped = 1;
is_tripped = 1; /* Set is_tripped after setting .tripped, as it gets cleared before .tripped. */
Py_AddPendingCall((int (*)(void *))PyErr_CheckSignals, NULL);
|
|
Date |
User |
Action |
Args |
2007-08-23 14:51:30 | admin | link | issue1643738 messages |
2007-08-23 14:51:30 | admin | create | |
|