fix for programmable completion functions setting traps on signals that readline handles

This commit is contained in:
Chet Ramey
2022-12-06 10:41:41 -05:00
parent 198210c58f
commit 237c32ba16
28 changed files with 3223 additions and 3018 deletions
+10 -1
View File
@@ -446,7 +446,12 @@ throw_to_top_level ()
#if defined (READLINE)
if (interactive)
bashline_reset ();
{
if (RL_ISSTATE (RL_STATE_SIGHANDLER) == 0)
rl_cleanup_after_signal ();
bashline_reset ();
}
#endif /* READLINE */
#if defined (PROCESS_SUBSTITUTION)
@@ -568,6 +573,8 @@ termsig_sighandler (sig)
RL_STATE_TERMPREPPED is possibly redundant. */
if (RL_ISSTATE (RL_STATE_SIGHANDLER) || RL_ISSTATE (RL_STATE_TERMPREPPED))
bashline_set_event_hook ();
else if (RL_ISSTATE (RL_STATE_COMPLETING|RL_STATE_DISPATCHING))
bashline_set_event_hook ();
#endif
SIGRETURN (0);
@@ -716,6 +723,8 @@ sigint_sighandler (sig)
quick response. */
else if (RL_ISSTATE (RL_STATE_SIGHANDLER))
bashline_set_event_hook ();
else if (RL_ISSTATE (RL_STATE_COMPLETING|RL_STATE_DISPATCHING))
bashline_set_event_hook ();
#endif
SIGRETURN (0);