Comment more thoroughly

This commit is contained in:
Sean Sullivan 2021-09-07 19:49:01 -07:00
parent 1f0f08c30d
commit c0de9c5497

View File

@ -130,6 +130,10 @@ class Sandbox
end end
if $stdin.tty? if $stdin.tty?
# If stdin is a TTY, use io.raw to set stdin to a raw, passthrough
# mode while we copy the input/output of the process spawned in the
# PTY. After we've finished copying to/from the PTY process, io.raw
# will restore the stdin TTY to its original state.
$stdin.raw(&write_to_pty) $stdin.raw(&write_to_pty)
else else
write_to_pty.call write_to_pty.call