diff options
author | Nobuyoshi Nakada <[email protected]> | 2019-12-29 16:12:19 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2019-12-29 16:26:22 +0900 |
commit | 31e2f035121a4c07d6ea3b5eab69bc97749a022b (patch) | |
tree | a7bd4ff7dfc7350524091e522b165d86a7a330b9 | |
parent | e5c441a4a2885da61df9894ac17b69cb3c5811f2 (diff) |
[ruby/io-console] Enable only interrupt bits on `intr: true`
https://github.com/ruby/io-console/commit/baaf929041
-rw-r--r-- | ext/io/console/console.c | 2 | ||||
-rw-r--r-- | test/io/console/test_io_console.rb | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/ext/io/console/console.c b/ext/io/console/console.c index ac5b6a611c..3a6bb25db2 100644 --- a/ext/io/console/console.c +++ b/ext/io/console/console.c @@ -188,7 +188,7 @@ set_rawmode(conmode *t, void *arg) #endif #ifdef ISIG if (r->intr) { - t->c_iflag |= BRKINT|IXON; + t->c_iflag |= BRKINT; t->c_lflag |= ISIG; } #endif diff --git a/test/io/console/test_io_console.rb b/test/io/console/test_io_console.rb index d71e42603f..77c6dac5a6 100644 --- a/test/io/console/test_io_console.rb +++ b/test/io/console/test_io_console.rb @@ -364,6 +364,11 @@ defined?(PTY) and defined?(IO.console) and TestIO_Console.class_eval do assert_ctrl("#{cc.ord}", cc, r, w) assert_ctrl("#{cc.ord}", cc, r, w) end + if cc = ctrl["stop"] + assert_ctrl("#{cc.ord}", cc, r, w) + assert_ctrl("#{cc.ord}", cc, r, w) + assert_ctrl("#{cc.ord}", cc, r, w) + end end end |