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

[ruby/io-console] Disable implementation-defined special control characters

In raw mode with interrupt enabled.

e9e8e3ff17
This commit is contained in:
Nobuyoshi Nakada 2019-12-13 11:41:31 +09:00
parent ec89a0f803
commit 81eb2d16ef
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60
2 changed files with 11 additions and 1 deletions

View file

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

View file

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