Open3 : tcgetattr: Inappropriate ioctl for device

U

Une Bévue

I'm using Open3 to simulate a pseudo-terminal connection with ssh.
Everything seems to work well except i get the following warning/error
when connecting :

tcgetattr: Inappropriate ioctl for device

here is my ruby code :
------------------------------------------------------------------------
#! /usr/bin/env ruby

require 'open3'

ansi_red="\e[31m"
ansi_clear="\e[0m"

system "stty cbreak isig" # isig unusefull ?

# tcgetattr: Inappropriate ioctl for device
Open3.popen3("ssh -t -t TT") { |stdin, stdout, stderr|
STDOUT.sync=true
#stdin.puts "cd /mnt/fat/4tt;ls -Al"
Thread.start do
while c=STDIN.getc
stdin.print c.chr
end
end
Thread.start do
while line=stderr.gets
puts ansi_red+line.chomp+ansi_clear
end
end
while c=stdout.getc
print c.chr
end
}

system "stty -cbreak -isig"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top