Error creating Expect object

J

jaysonhill03

I'm running a process that creates many different child processes,
each of which create an Expect object. I'm getting the following
error:
Cannot create a new IO::Tty from fd -1: Invalid argument

The code I use to create the Expect object is as follows:
$self->{myFTPHandle}=new Expect;
$self->{myFTPHandle}->debug($debug);
$self->{myFTPHandle}->raw_pty(1);
$self->{myFTPHandle}->log_stdout(0); # Suppress writing of sftp
replies to stdout

The error is on the instantiation of the object (the new Expect call
above). I'm not sure what, exactly, is causing this error. Any help
would be much appreciated.

O/S: HP-UX B.11.11
perl: 5.6.1

Thanks.
 
M

Martien Verbruggen

On Wed, 10 Dec 2008 11:44:43 -0800 (PST),
I'm running a process that creates many different child processes,
each of which create an Expect object. I'm getting the following
error:
Cannot create a new IO::Tty from fd -1: Invalid argument

This error actually comes from IO::Tty, not from Expect, and it means
that its allocate_pty() XS function, somehow, thinks that it succeeded
in allocating what it needs (i.e. it returned success), but in fact, it
hasn't correctly completed.

This is either a bug in IO::Tty, or in the libraries that it uses on
your system. You could try having a look at IO::TTy directly to see what
happens.
O/S: HP-UX B.11.11
perl: 5.6.1

That's a fairly old Perl installation. Have you checked that the modules
that you're using are up to the latest version? Which Expect and IO::TTy
are you using?

Martien
 

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

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top