On 9/30/22 11:11 AM, Chet Ramey wrote:
On 9/20/22 3:13 PM, Simon Marchi wrote:
I think that it could be fixed in readline by doing the following when
reinstalling the old signal handlers:
- block signals
- call RL_CHECK_SIGNALS
- restore old handlers
- unblock signals
Readline could probably get most or all of the way there by modifying
CALLBACK_READ_RETURN to call rl_check_signals/RL_CHECK_SIGNALS after
calling rl_clear_signals and before the return. What do you think?
I'm getting back to looking at this. I've attached a patch that does this.
Try it out and let me know.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU [email protected] http://tiswww.cwru.edu/~chet/
*** ../readline-8.2-patched/callback.c 2022-04-29 12:02:56.000000000 -0400
--- callback.c 2022-10-11 10:59:06.000000000 -0400
***************
*** 116,120 ****
do { \
if (rl_persistent_signal_handlers == 0) \
! rl_clear_signals (); \
return; \
} while (0)
--- 116,123 ----
do { \
if (rl_persistent_signal_handlers == 0) \
! { \
! rl_clear_signals (); \
! if (_rl_caught_signal) _rl_signal_handler (_rl_caught_signal); \
! } \
return; \
} while (0)