diff options
Diffstat (limited to 'ext/pty')
-rw-r--r-- | ext/pty/pty.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/pty/pty.c b/ext/pty/pty.c index 9650f533f2..9026dafee6 100644 --- a/ext/pty/pty.c +++ b/ext/pty/pty.c @@ -462,8 +462,9 @@ pty_close_pty(VALUE assoc) * # assuming that factor uses stdio for stdout buffering. * # If IO.pipe is used instead of PTY.open, * # this code deadlocks because factor's stdout is fully buffered. + * require 'io/console' # for IO#raw! * m, s = PTY.open - * system("stty raw", :in=>s) # disable newline conversion. + * s.raw! # disable newline conversion. * r, w = IO.pipe * pid = spawn("factor", :in=>r, :out=>s) * r.close |