You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-shells/bash/files/bash-4.3-term-cleanup.patch

48 lines
2.1 KiB

http://lists.gnu.org/archive/html/bug-bash/2014-09/msg00031.html
*** ../bash-4.3-patched/bashline.c 2014-05-14 09:22:39.000000000 -0400
--- bashline.c 2014-09-08 11:28:56.000000000 -0400
***************
*** 203,206 ****
--- 203,207 ----
extern int array_needs_making;
extern int posixly_correct, no_symbolic_links;
+ extern int sigalrm_seen;
extern char *current_prompt_string, *ps1_prompt;
extern STRING_INT_ALIST word_token_alist[];
***************
*** 4209,4214 ****
/* If we're going to longjmp to top_level, make sure we clean up readline.
check_signals will call QUIT, which will eventually longjmp to top_level,
! calling run_interrupt_trap along the way. */
! if (interrupt_state)
rl_cleanup_after_signal ();
bashline_reset_event_hook ();
--- 4262,4268 ----
/* If we're going to longjmp to top_level, make sure we clean up readline.
check_signals will call QUIT, which will eventually longjmp to top_level,
! calling run_interrupt_trap along the way. The check for sigalrm_seen is
! to clean up the read builtin's state. */
! if (terminating_signal || interrupt_state || sigalrm_seen)
rl_cleanup_after_signal ();
bashline_reset_event_hook ();
*** ../bash-4.3-patched/sig.c 2014-01-10 15:06:06.000000000 -0500
--- sig.c 2014-09-08 11:26:33.000000000 -0400
***************
*** 533,538 ****
/* Set the event hook so readline will call it after the signal handlers
finish executing, so if this interrupted character input we can get
! quick response. */
! if (interactive_shell && interactive && no_line_editing == 0)
bashline_set_event_hook ();
#endif
--- 533,540 ----
/* Set the event hook so readline will call it after the signal handlers
finish executing, so if this interrupted character input we can get
! quick response. If readline is active or has modified the terminal we
! need to set this no matter what the signal is, though the check for
! RL_STATE_TERMPREPPED is possibly redundant. */
! if (RL_ISSTATE (RL_STATE_SIGHANDLER) || RL_ISSTATE (RL_STATE_TERMPREPPED))
bashline_set_event_hook ();
#endif