summaryrefslogtreecommitdiff
path: root/ext/readline
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-16 03:45:12 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-16 03:45:12 +0000
commit606ea39a3b03566079d49711ab8a7b53d447b938 (patch)
treeb9d9b6674661bee600374d2826f1931103ead6d0 /ext/readline
parent34f8c6becdc7e713e12bf76b99567ef55ec74195 (diff)
Fix SEGV of readline on FreeBSD. [ruby-core:21884]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/readline')
-rw-r--r--ext/readline/readline.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/readline/readline.c b/ext/readline/readline.c
index 660ee6d..45be322 100644
--- a/ext/readline/readline.c
+++ b/ext/readline/readline.c
@@ -253,6 +253,7 @@ readline_readline(int argc, VALUE *argv, VALUE self)
if (status) {
#if defined HAVE_RL_CLEANUP_AFTER_SIGNAL
/* restore terminal mode and signal handler*/
+ rl_free_line_state();
rl_cleanup_after_signal();
#elif defined HAVE_RL_DEPREP_TERM_FUNCTION
/* restore terminal mode */
@@ -1450,6 +1451,8 @@ Init_readline()
#elif defined HAVE_RL_EVENT_HOOK
rl_event_hook = readline_event;
#endif
+ rl_catch_signals = 0;
+ rl_catch_sigwinch = 0;
#ifdef HAVE_RL_CLEAR_SIGNALS
rl_clear_signals();
#endif