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

[ruby/io-console] Enable only interrupt bits on intr: true

https://github.com/ruby/io-console/commit/baaf929041
This commit is contained in:
Nobuyoshi Nakada 2019-12-29 16:12:19 +09:00
parent e5c441a4a2
commit 31e2f03512
2 changed files with 6 additions and 1 deletions

View file

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

View file

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