1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
naruse 2009-07-16 03:45:12 +00:00
parent 34f8c6becd
commit 606ea39a3b
2 changed files with 11 additions and 0 deletions

View file

@ -1,3 +1,11 @@
Thu Jul 16 12:42:10 2009 NARUSE, Yui <naruse@ruby-lang.org>
* ext/readline/readline.c (readline_readline): rl_free_line_state
before rl_cleanup_after_signal.
* ext/readline/readline.c (Init_readline): set rl_catch_signals and
rl_catch_signwinch as 0. [ruby-core:21884]
Thu Jul 16 08:59:22 2009 Koichi Sasada <ko1@atdot.net>
* node.h, vm_core.h, variable.c: rename global_entry to rb_global_entry.

View file

@ -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