The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Inappropriate ioctl for device RishiPahuja Shell Programming and Scripting 11 03-19-2008 10:47 PM
Inappropriate ioctl for device, format error spoonman SUN Solaris 2 08-24-2006 01:01 PM
Inappropriate ioctl for device steelrose UNIX for Dummies Questions & Answers 4 08-23-2006 11:08 AM
Inappropriate ioctl for device spoonman UNIX for Dummies Questions & Answers 0 08-23-2006 10:39 AM
Inappropriate ioctl for device tojaiganesh Filesystems, Disks and Memory 4 03-17-2005 05:23 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-26-2007
contactme contactme is offline
Registered User
  
 

Join Date: Feb 2007
Posts: 3
Inappropriate ioctl for device at

I am getting the error "Inappropriate ioctl for device" at croak (on 5th line inside the subroutoine given below). anybody has any idea what could be the reason for that. It do succeeds sometime and other times fail with "Inappropriate ioctl for device":

This is a subroutine in my program which is trying to use to open a telnet connection with the host. It's checking whether it already has the telnet connection, so that it doesn't open another one:

sub t()
{
# we have a telnet session, but host doesn't respond
if ($t and not scalar $t->cmd("echo hello, world")) {
$self->{TELNET} = undef;
#error
croak "telnet poke (\"echo hello, world\") failed: ", $t->errmsg();
}

if (not $t) {
debug "telnet: connecting to " . $self->{HOST} . "\n";

$t = new Net::Telnet(Timeout => $self->{CMDTIMEOUT},
Errmode => 'return')
or croak "telnet: new failed: $@\n";

# $t->dump_log("dump.out.$$");
$t->open(Host => $self->{HOST}, Port => 2342)
or croak "telnet: open failed: $@";
# send a newline so we can look at the prompt
my $oldprompt = $t->prompt("/.*:/");
$t->cmd("\n") or
croak "telnet: newline failed: ", $t->errmsg();
}
}

Looking for some positive answers
Closed Thread

Bookmarks

Tags
inappropriate ioctl for device

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:45 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0