Open3 : tcgetattr: Inappropriate ioctl for device

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"
------------------------------------------------------------------------

what could be the right ioctl setup ?
I'm a complete newbie in using process, pipe, fork and tty...
-- 
Une B�vue
0
9/7/2008 7:42:55 AM
comp.lang.ruby 48887 articles. 0 followers. Post Follow

0 Replies
466 Views

Similar Articles

[PageSpeed] 26
Reply:
Similar Artilces:

Device Context of Entire Screen
Hiiiiiii I am programming in Visual C++ 6.0 I want to get RGB percent of all of pixls of screen, and so I need to get Device Context of entire screen. I know that CClientDC dc(this) gets a divice context handler for the active window of my application that is running. I want to know what expression must be the argument of constructor of CClinetDC except "this" in the above expression so the entire screen device context handler be otained. Thanks a lot. byyyyyye Abd wrote: > Hiiiiiii > I am programming in Visual C++ 6.0 > I want to get RGB percent of all of pixls of screen, ...

US-TX-Austin: Win Device Driver Developer, 8+yrs exp. , 5+yrs. Win Device Driver (45345257606)
US-TX-Austin: Win Device Driver Developer, 8+yrs exp. , 5+yrs. Win Device Driver (45345257606) ============================================================================================== Position: Win Device Driver Developer Reference: SMC01793 Location: Austin TX Duration: Perm Skills: BSCE or BSEE and 8+ years 5+ yrs. Windows driver dev. experience. Audio and C++ driver dev. experience. Good understanding/experience with Windows WDM Can work well independently Can "hit the ground...

Inappropriate Domain Calculation Warnings
MathGroup: Here's an example of Solve with a user-specified Domain. It is accompanied by a Warning which is inappropriate for the specified Domain. In[1]:= Solve[(2^53 == 10^x), x, Element[x, Reals]] // N Solve::ifun: Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution information. Out[1]= {{x -> 15.9546}} Given the Domain spec that x is a Real number, I would think this Solve::ifun: message would not propagate to printout -- i.e., that it would be suppressed. This is how I feel a new user w...

Dynamically loading a device driver for kernel 2.6 (PnP). How do HAL and udev work together ?
Hi, I still have some holes in my knowledge about how linux dynamically loads a driver module in response to for instance plugging a usb device. It would be great if somebody could point me to a walked through example. I am using SuSE Linux 10.2 with 2.6 kernel. What I want to experiment with is the following: I have a demo-board with ARM microcontroller and USB device port. For my purposes I can invent my own vendor-id/device-id. I'll write first of all a minimal driver and I'd like to see it automatically loaded when I plug it into the USB-connection and removed sometime a...

US-TX-Austin: Win Device Driver Developer, 8+yrs exp. , 5+yrs. Win Device Driver (45331457605)
US-TX-Austin: Win Device Driver Developer, 8+yrs exp. , 5+yrs. Win Device Driver (45331457605) ============================================================================================== Position: Win Device Driver Developer Reference: SMC01793 Location: Austin TX Duration: Perm Skills: BSCE or BSEE and 8+ years 5+ yrs. Windows driver dev. experience. Audio and C++ driver dev. experience. Good understanding/experience with Windows WDM Can work well independently Can "hit the ground...

Rumor: Google pressured Asus to cancel Android/Windows dual-boot devices
<http://goo.gl/K9ozZm> Apple Insider ----- Google may have demanded the product's cancellation due to concerns about giving Microsoft a new foothold in the mobile device space, according to Digitimes. Windows currently accounts for a minuscule fraction of the mobile device market, and Google is likely looking to avoid a scenario in which its battle with Apple turns into a multi-front war. ----- If MS did this - or was even rumored to be doing this - you can bet the "advocates" would go crazy over this. But this is Google... so n...

Open3 with nonblocking reads
I'm currently trying to execute a script within a script, writing the STDOUT and STDERR in the same logfile, every single line should contain if it's STDOUT [S] or STDERR [E], but i need also the actual timestamp when the STDERRs and STDOuts were passed to the logfile. Later on, i can sort the logfile chronological and see exactly when the script began to run wild. I dont want to wait until the inner script has ended, if possible I need live feedback from the script to handle with STDOUT and STDERR and have an actual timestamp (else all timestamps would be the same which is no...

create own printer device
Hello is it possible to write a output device ( printer ) in clipper and to set it via "set device to" [ Set( _SET_DEVICE, "MYDEVICE" ) ] ? Bye Andreas Andreas, What are you trying to achieve? E. Fridman wrote: > Andreas, > > What are you trying to achieve? Use the very nice print Functions of vouch32 without the need to rewrite all my applications. It would be possible to modify the std.ch to use the vouch funtions, but this works only if all the prints should go through this lib. This is not the case in our application where certain prints must be fast (...

Microsoft Runs on Broadest Types of Devices, Ever
Microsoft Unveils Windows 10; Runs on 'Broadest Types of Devices Ever' https://www.yahoo.com/tech/windows-10-microsoft-microsoft-is-officially-988= 17217819.html Microsoft is officially unveiling the name for the next release of Windows = today: Windows 10. While the software maker had referred to Windows 10 as c= odename Windows Threshold internally, today's official naming puts any rumo= rs of Windows, Windows TH, Windows X, Windows One, and even Windows 9 to be= d. It's simply Windows 10, marking a jump from the mixed reception of Windo= ws 8. Described as Mic...

Method and apparatus for dynamic load of an ABIOS device support layer in a computer system
5,495,611 http://www.uspto.gov/patft/index.html -- Reply to ohland@charter.net ...

devices.fcp.array and devices.fcp.changer
Hi Guys, Does anyone know an answer to this problem : I'm trying to configure an ADIC scalar 100 library on an AIX 5 system. When I run cfgmrg it comes up with the message devices.fcp.array is missing. And I can't see the robot, however I can see the drives. With Kind regards, Stephan Hudepohl Have you called ADIC? Are you fibre or scsi attached? Are all the cables connected (there should be at least 2 cables)? Stephan Hudepohl wrote: > Hi Guys, > > Does anyone know an answer to this problem : > > I'm trying to configure an ADIC scalar 100 library on an ...

Can't see USB devices
G3/333 Tower, OS 9.1, USB PCI card. Up until now, everything worked fine. Epson printer and SmartMedia card reader connected to the USB PCI card. All of a sudden nothing shows up. USB does not show up in the Chooser, SmartMedia cards (from digital cam) do not mount. The USB card *does* show up in the System Profiler - Devices and Volumes. I have not touched *anything* in Extensions. Any ideas out there? I am frustrated and *baffled*! Thanks, MK In article <Pine.GSO.4.05.10402150814000.10843-100000@joxer.acsu.buffalo.edu>, Michael L Kankiewicz <michaelk@buffalo.edu> w...

TiVo founders launch QPlay internet TV device
From the "there still isn't anything to watch" department: Title: TiVo founders launch QPlay internet TV device and iPad app Author: Brad Linder Date: Tue, 25 Feb 2014 11:45:23 -0500 Link: http://feedproxy.google.com/~r/Liliputing/~3/gjmqICyYr6I/tivo-founders-launch-qplay-internet-tv-device-ipad-app.html TiVo founders Mike Ramsey and Jim Barton changed the way many people watched television, allowing users to record scheduled broadcasts and watch them on their own schedules. Now Ramsey and Barton are back — and this time they’re taking aim at internet video. Their ne...

/dev/pts/x, /proc/x/fd, reading stdout, writing stdin, not with open3
Hi are there any perl gods out there that could help me. :) is it possible to open(?) /dev/pts/x that another program has created/using/virtual_console and read its stdout and let me write to its stdin? is it possible to use /proc/$pid/fd/x in some way? the only way i've found to work is with open3 call, but this not nice to the program that needs to be running 24/7. :) any tips/hints are very welcome, both on a perl solution and general info on /dev/pts/ and /proc/$pid/fd/. /Andreas On Tue, 02 Mar 2004 18:52:29 +0000, Andreas Persson wrote: > are there any perl gods out there ...

Re: GPLOT legend and device questions (repost)
Many questions... 1. you use a legend, but you never defined one. Have a look into the documentation for the LEGEND statement to do it. 2. try the ORDER statement in the axis definition. E.g. axis1 order=(0 to 30 by 1); but be careful with too many tickmarks an values which you do not know! Sometimes it is useful to calculate the limits and put the results of the calculations in macro variables which you can use for your ORDER= option in the AXIS's statements. 3. order=(0 to 30 by 5) Almost anything is possible in GRAPH ! If you have no documentation, look at http://support.sas.com/o...

no sound output when using ioctl
hi, i am working on RED HAT 9.1 ver 2.2.4 i am trying to play .wav files on my system using"bplay'' or "ALSA" . Both of these use ioctl to render dat to to the device but i am not able to do so on my system. every thing seems to work fine but there is no out put on my speakers. i am also not able to here anything using cat sample.wav > /dev/dsp can anoyone guide me thanks in advance vikas ...

Mapping a DirectSound device to a Windows mixer
Hi Is there some way in Windows (2K and XP) to find the mixer belonging to a DirectSound device? I would e.g. like to be able to enable/ disable microphone boost and change from Microphone to Line In while I'm recording. When I enumerate the DirectSound devices I get the device name in the DSENUMCALLBACK callback but the name I get doesn't necessarily correspond to the name in the mixer's MIXERCAPS-struct. Also the name in the MIXERCAPS-struct is only 32 characters so some names are truncated. I've noticed there's a MIXERCAPS2-struct which has a GUID but it do...

Open3
Hello everyone. I have created a sales system for my company. Basically you telnet to the system and enter your login name, password ... From there you can access the sales system. I am working on a feature to write reports for a certain area of the system. For this, I want it to just shell out to VIM (Vi iMproved). For this I will be using Popen3, so the telnet user can access the sytem. This is some example code I have ... def runVimForReport( node_number, file_name ) stdin, stdout, stderr = Open3.popen3('vim #{file_name}' ) read_thread = Thread.new { start_read(stdout,stderr...

[News] More Devices That Run Linux: Remote Monitoring Device, Thin Clients
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Remote monitoring device offers 3G modem ,----[ Quote ] | Machine-to-machine (M2M) communications vendor Sixnet is shipping a | cellular-enabled remote monitoring and control device that runs Linux. `---- http://www.linuxdevices.com/news/NS5490897310.html?kc=rss Low-cost thin client offers choice of protocols ,----[ Quote ] | Igel Technology announced a $186 thin client for small and home office (SOHO) | businesses and "unmanaged" environments. The Igel One runs Linux on a Via | Eden processor clocked at 400MHz, with 512MB RAM, ...

Theoretical Max FC-AL Devices Question...
This is a very simple question but one for which I'm finding conflicting answers. What is the (theoretical) maximum number of devices on a FC-AL? Here's a sampling: 127: "On a single FC-AL loop up to 127 devices can be attached, and they are visible by simply plugging them in." www.storus.ru/pdf/SCSI_vs_FC.pdf 126: "In the FC-AL topology, there can be up to 126 nodes connected to a single link, but as you might expect, the more devices that share the loop, the lower the performance." http://www.enterprisestorageforum.com/technology/features/a...

US-TX-Austin: Win Device Driver Developer, 8+yrs exp. , 5+yrs. Win Device Driver (45340532413)
US-TX-Austin: Win Device Driver Developer, 8+yrs exp. , 5+yrs. Win Device Driver (45340532413) ============================================================================================== Position: Win Device Driver Developer Reference: SMC01793 Location: Austin TX Duration: Perm Skills: BSCE or BSEE and 8+ years 5+ yrs. Windows driver dev. experience. Audio and C++ driver dev. experience. Good understanding/experience with Windows WDM Can work well independently Can "hit the ground...

port script to embedded device
Hi, I have some python scripts, I need to run a netgear router, i have a cross compilation setup that works for c code no problem. the python interpreter doesn't appear to have been successfully cross compiled to this netgear router although others have tried. what i'd like to do is get these scripts to run on the router. i saw pyinstaller creates exes that can be run on a standard x86 linux desktop. what i thought i could do was create an exe, decompile it to c and then do a cross compile for the device. there must be a better way... any suggestions? can I get pyinstaller to make a...

US-TX-Austin: Win Device Driver Developer, 8+yrs exp. , 5+yrs. Win Device Driver (45344632408)
US-TX-Austin: Win Device Driver Developer, 8+yrs exp. , 5+yrs. Win Device Driver (45344632408) ============================================================================================== Position: Win Device Driver Developer Reference: SMC01793 Location: Austin TX Duration: Perm Skills: BSCE or BSEE and 8+ years 5+ yrs. Windows driver dev. experience. Audio and C++ driver dev. experience. Good understanding/experience with Windows WDM Can work well independently Can "hit the ground...

Bluetooth device not found anymore
Hello all, I've tryed to search for manuals and internal structure of my Acer Aspire 3650 and found no results. The problem is the following: the Lan and the Wireless 800.11g is working fine but the Bluetooth stopped to work. All parts/pieces are internals and I don't know how to locate it or to make any test to redetec the bluetooth build-in board. This model of laptop comes with two slide buttons that enable/disable the device but I'm sure that the button isn't the problem. Any Idea what might be the problem? I've recently added more 512GB of DDR2 533 to it and everythin...

Perl on embedded device
I have always run perl on laptops and desktops. We are looking to make a little LINUX display. Which begs me to ask the question Does LINUX and PERL run on small embedded devices ? Quoth "Andrew Rich" <vk4tec@people.net.au>: > I have always run perl on laptops and desktops. > > We are looking to make a little LINUX display. > > Which begs me to ask the question > > Does LINUX and PERL run on small embedded devices ? If you can run Linux, you can probably run Perl. I can't answer as to whether you can run Linux: ask in a Linux group. Ben -...