Skip to content

Commit b77f880

Browse files
committed
Fix bugs
1 parent da2860c commit b77f880

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

component/client.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ def restore_console
1111

1212
def runas_client(argv)
1313
$mode = :client
14-
$tty_attr = %x[/bin/stty -g].chomp
1514
is_tty = $stdin.isatty && $stdout.isatty && $stderr.isatty
15+
$tty_attr = %x[/bin/stty -g].chomp if is_tty
1616
socket = UNIXSocket.open(SOCKET_PATH) # connect to daemon
1717

1818
# send stdin/stdout/stderr to daemon

lib/pty_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def resize(rows, cols)
4646

4747
def forward_io(srcIO, dstIO)
4848
Thread.new do
49-
until srcIO.closed?
49+
until srcIO.closed? || srcIO.eof?
5050
begin
5151
dstIO.write(srcIO.read_nonblock(131072))
5252
rescue IO::WaitReadable

0 commit comments

Comments
 (0)