diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-12-13 11:41:31 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-12-17 13:55:04 +0900 |
commit | 81eb2d16efcb29899e88e30a25ca5440195e2393 (patch) | |
tree | 7b6d93da4aac517a66f25477482fb3888d6a39f5 | |
parent | ec89a0f8033215817d9c6f9300d9513178e785b7 (diff) |
[ruby/io-console] Disable implementation-defined special control characters
In raw mode with interrupt enabled.
https://github.com/ruby/io-console/commit/e9e8e3ff17
-rw-r--r-- | ext/io/console/console.c | 2 | ||||
-rw-r--r-- | test/io/console/test_io_console.rb | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/ext/io/console/console.c b/ext/io/console/console.c index 546f96226b..ec70bdf9df 100644 --- a/ext/io/console/console.c +++ b/ext/io/console/console.c @@ -187,7 +187,7 @@ set_rawmode(conmode *t, void *arg) #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 eab0fb6c6d..765385df40 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 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 |