Error creating Expect object

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

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

The code I use to create the Expect object is as follows:
    $self->=new Expect;
    $self->->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


Re: Error creating Expect object

On Wed, 10 Dec 2008 11:44:43 -0800 (PST),
Quoted text here. Click to load it

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

Quoted text here. Click to load it

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 Verbruggen           | Computers in the future may weigh no | more than 1.5 tons. -- Popular
                             | Mechanics, 1949

Site Timeline