BasicObject
# File pty/shl.rb, line 20
def writer
system "stty -echo raw"
begin
while true
c = STDIN.getc
if c == 26 then # C-z
$reader.raise(nil)
return 'Suspend'
end
$w_pty.print c.chr
$w_pty.flush
end
rescue
$reader.raise(nil)
return 'Exit'
ensure
system "stty echo -raw"
end
end