8000 Enable only interrupt bits on `intr: true` · ruby/io-console@baaf929 · GitHub
[go: up one dir, main page]

Skip to content

Commit baaf929

Browse files
committed
Enable only interrupt bits on intr: true
1 parent bc9ae9e commit baaf929

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

ext/io/console/console.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ set_rawmode(conmode *t, void *arg)
188188
#endif
189189
#ifdef ISIG
190190
if (r->intr) {
191-
t->c_iflag |= BRKINT|IXON;
191+
t->c_iflag |= BRKINT;
192192
t->c_lflag |= ISIG;
193193
}
194194
#endif

test/io/console/test_io_console.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,11 @@ def test_intr
364364
assert_ctrl("#{cc.ord}", cc, r, w)
365365
assert_ctrl("#{cc.ord}", cc, r, w)
366366
end
367+
if cc = ctrl["stop"]
368+
assert_ctrl("#{cc.ord}", cc, r, w)
369+
assert_ctrl("#{cc.ord}", cc, r, w)
370+
assert_ctrl("#{cc.ord}", cc, r, w)
371+
end
367372
end
368373
end
369374

0 commit comments

Comments
 (0)
0