# Cannot create a new IO::Tty from fd 4: Bad file descriptor



## swaprava (Apr 3, 2009)

Hi all,

Since my perl scripts were not running properly, I reinstalled the perl modules after deinstalling the older version. Now, even the scripts which were running with the older version of the perl modules stopped working. The error messages are as shown below:

========== TEST 1 ==========
./LLA_DADSuccess.seq -pkt LLA_SAA.def -log 1.HTML -it "Address Autoconfiguration and Duplicate Address Detection"
Start Capturing Packets (Link0)
*** Target initialization phase ***
Wait 15 second
Cannot create a new IO::Tty from fd 4: Bad file descriptor at /usr/local/lib/perl5/site_perl/5.8.8/V6evalRemote.pm line 582
reboot_async.rmt returned status 9
*** Target testing phase ***
==========================
===================================
/usr/local/lib/perl5/site_perl/5.8.8/V6evalRemote.pm line 582 is:

$Remote = Expect->spawn("$TermCmd");
===================================
$TermCmd returns cu -l cuad0

I checked it by printing it.

Can you please let me know what is the problem here? I searched in Google and found one discussion forum: 
http://kerneltrap.org/index.php?q=mailarchive/freebsd-bugs/2008/11/17/4144314 , which reports similar issue.

if this is a problem with the latest version of the perl modules, how should I go back to the older version?

Thanks in advance,

Swaprava


----------



## DutchDaemon (Apr 3, 2009)

Have you tried updating ports and upgrading to perl 5.8.9, recursively rebuilding all that depends on it?


----------



## swaprava (Apr 3, 2009)

DutchDaemon said:
			
		

> Have you tried updating ports and upgrading to perl 5.8.9, recursively rebuilding all that depends on it?



Yes, I did reinstalling, not 5.8.9, but 5.8.8

However that doesn't seem to be the problem: I can't issue the following command and log into the router that is connected to the serial port of the FreeBSD server:

cu -l /dev/cuad0

this seems to be the problem why the script is also failing. Any way out?


----------



## DutchDaemon (Apr 3, 2009)

Are you sure it's 5.8.8? That version is no longer in the ports tree, so a reinstall of lang/perl5.8 using an up-to-date ports tree should have given you 5.8.9 (perl -v).


----------



## swaprava (Apr 3, 2009)

DutchDaemon said:
			
		

> Are you sure it's 5.8.8? That version is no longer in the ports tree, so a reinstall of lang/perl5.8 using an up-to-date ports tree should have given you 5.8.9 (perl -v).



[root@swaprava /dev]# perl -v

This is perl, v5.8.8 built for i386-freebsd-64int
(with 1 registered patch, see perl -V for more detail)

Copyright 1987-2006, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

This is my perl. I went to the lang/perl5.8.8/ , did make install clean, and this resulted !!


----------



## DutchDaemon (Apr 3, 2009)

Ok, just checking. In a recent ports tree lang/perl5.8.8 doesn't exist anymore. You could still try a force-reinstall of p5-\* or a reinstall of ports depending on perl.


----------



## SirDice (Apr 6, 2009)

swaprava said:
			
		

> This is my perl. I went to the lang/perl5.8.8/ , did make install clean, and this resulted !!


Your ports tree is out of date. Update it before updating perl.


----------

