On 1/27/07, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote: > > Why not? > > Correct me if I'm wrong, but what I got from the OP > was that the current method does > > if (is_tripped) { > for each signal { > if the signal has occurred, call its handler > } > is_tripped = 0; > } > > and the problem is that any setting of is_tripped that > occurs in the midst of calling the handlers gets > wiped out at the end. > > Changing this to > > while (is_tripped) { > for each signal { > if the signal has occurred, call its handler > } > is_tripped = 0; > } > > doesn't solve that, because is_tripped still gets > set to 0 before it's tested again. Agreed. > Thinking about it more, probably it doesn't. What's > important is to clear it *before* testing whether any > handlers need to be called, i.e. > > if (is_tripped) { > is_tripped = 0; > for each signal { > if the signal has occurred, call its handler > } > } > That's exactly what my patch does as you can see here: http://www.python.org/sf/1643738 Regards, -- Ulisses
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4