--- readline/display.c 5 May 2006 18:26:12 -0000 1.11 +++ readline/display.c 19 Mar 2008 05:10:16 -0000 @@ -463,6 +463,10 @@ rl_redisplay () if (!readline_echoing_p) return; + /* Signals are blocked through this function as the global data structures + could get corrupted upon modifications from an invoked signal handler. */ + block_sigint (); + if (!rl_display_prompt) rl_display_prompt = ""; @@ -1139,6 +1143,8 @@ rl_redisplay () else visible_wrap_offset = wrap_offset; } + + release_sigint (); } /* PWP: update_line() is based on finding the middle difference of each --- readline/rltty.c 5 May 2006 18:26:12 -0000 1.9 +++ readline/rltty.c 19 Mar 2008 05:10:16 -0000 @@ -52,8 +52,8 @@ extern int errno; rl_vintfunc_t *rl_prep_term_function = rl_prep_terminal; rl_voidfunc_t *rl_deprep_term_function = rl_deprep_terminal; -static void block_sigint PARAMS((void)); -static void release_sigint PARAMS((void)); +void block_sigint PARAMS((void)); +void release_sigint PARAMS((void)); static void set_winsize PARAMS((int)); @@ -75,7 +75,7 @@ static int sigint_blocked; /* Cause SIGINT to not be delivered until the corresponding call to release_sigint(). */ -static void +void block_sigint () { if (sigint_blocked) @@ -100,7 +100,7 @@ block_sigint () } /* Allow SIGINT to be delivered. */ -static void +void release_sigint () { if (sigint_blocked == 0) --- readline/rltty.h 5 May 2006 18:26:12 -0000 1.5 +++ readline/rltty.h 19 Mar 2008 05:10:16 -0000 @@ -79,4 +79,7 @@ typedef struct _rl_tty_chars { unsigned char t_status; } _RL_TTY_CHARS; +extern void block_sigint PARAMS((void)); +extern void release_sigint PARAMS((void)); + #endif /* _RLTTY_H_ */