ruby-changes:59290
From: Nobuyoshi <ko1@a...>
Date: Tue, 17 Dec 2019 14:12:24 +0900 (JST)
Subject: [ruby-changes:59290] 81eb2d16ef (master): [ruby/io-console] Disable implementation-defined special control characters
https://git.ruby-lang.org/ruby.git/commit/?id=81eb2d16ef From 81eb2d16efcb29899e88e30a25ca5440195e2393 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Fri, 13 Dec 2019 11:41:31 +0900 Subject: [ruby/io-console] Disable implementation-defined special control characters In raw mode with interrupt enabled. https://github.com/ruby/io-console/commit/e9e8e3ff17 diff --git a/ext/io/console/console.c b/ext/io/console/console.c index 546f962..ec70bdf 100644 --- a/ext/io/console/console.c +++ b/ext/io/console/console.c @@ -187,7 +187,7 @@ set_rawmode(conmode *t, void *arg) https://github.com/ruby/ruby/blob/trunk/ext/io/console/console.c#L187 #ifdef ISIG if (r->intr) { t->c_iflag |= BRKINT|IXON; - t->c_lflag |= ISIG|IEXTEN; + t->c_lflag |= ISIG; } #endif (void)r; diff --git a/test/io/console/test_io_console.rb b/test/io/console/test_io_console.rb index eab0fb6..765385d 100644 --- a/test/io/console/test_io_console.rb +++ b/test/io/console/test_io_console.rb @@ -352,6 +352,16 @@ defined?(PTY) and defined?(IO.console) and TestIO_Console.class_eval do https://github.com/ruby/ruby/blob/trunk/test/io/console/test_io_console.rb#L352 assert_ctrl("#{cc.ord}", cc, r, w) assert_ctrl("Interrupt", cc, r, w) end + if cc = ctrl["dsusp"] + assert_ctrl("#{cc.ord}", cc, r, w) + assert_ctrl("#{cc.ord}", cc, r, w) + assert_ctrl("#{cc.ord}", cc, r, w) + end + if cc = ctrl["lnext"] + assert_ctrl("#{cc.ord}", cc, r, w) + assert_ctrl("#{cc.ord}", cc, r, w) + assert_ctrl("#{cc.ord}", cc, r, w) + end end end -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/