Message46070
Logged In: YES
user_id=119306
Here is another possible approach to solving the problem of readline
exiting for signals other than SIGINT. I'm not sure if it is better or worse
than the scarypatch.
As you said, the call to readline is performed without the GIL. So is the
actual C-level signal handler from the signal module (the python code
that gets associated with the signal is deferred until later.) At the time
we see the EINTR, there is a flag in the signal module's Handler array to
say whether the signal that we received was a SIGINT. If we added some
sort of interface within the signal module to find out what signals are
pending to be run on the next call to PyErr_CheckSignals, then we could
find out if the EINTR was caused by an INT (at which point we should
exit) or by another signal (at which we could just retry the select.)
Is there any potential to this approach? |
|
Date |
User |
Action |
Args |
2007-08-23 15:37:54 | admin | link | issue960406 messages |
2007-08-23 15:37:54 | admin | create | |
|