We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent da2860c commit b77f880Copy full SHA for b77f880
component/client.rb
@@ -11,8 +11,8 @@ def restore_console
11
12
def runas_client(argv)
13
$mode = :client
14
- $tty_attr = %x[/bin/stty -g].chomp
15
is_tty = $stdin.isatty && $stdout.isatty && $stderr.isatty
+ $tty_attr = %x[/bin/stty -g].chomp if is_tty
16
socket = UNIXSocket.open(SOCKET_PATH) # connect to daemon
17
18
# send stdin/stdout/stderr to daemon
lib/pty_helper.rb
@@ -46,7 +46,7 @@ def resize(rows, cols)
46
47
def forward_io(srcIO, dstIO)
48
Thread.new do
49
- until srcIO.closed?
+ until srcIO.closed? || srcIO.eof?
50
begin
51
dstIO.write(srcIO.read_nonblock(131072))
52
rescue IO::WaitReadable
0 commit comments