Skip Menu |

This queue is for tickets about the Expect CPAN distribution.

Report information
The Basics
Id: 29126
Status: rejected
Priority: 0/
Queue: Expect

People
Owner: Nobody in particular
Requestors: georg.moritz [...] millenux.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: exp_init fails if STDIN is tied and no fileno() in its package
Date: Mon, 3 Sep 2007 11:17:17 +0200 (CEST)
To: bug-Expect [...] rt.cpan.org
From: Georg Moritz <georg.moritz [...] millenux.com>
Hello, due to line 207 in Expect.pm v1.19 exp_init fails if STDIN is tied and the package it is tied to doesn't have a method FILENO. # line 207 ${*$self}{exp_Pty_Handle} = "STDIN" if $self->fileno() == fileno (STDIN); I stumbled over that using Expect in a fastcgi application where STDIN is tied to FCGI::Stream. # fix: unless (tied *STDIN) { ${*$self}{exp_Pty_Handle} = "STDIN" if $self->fileno() == fileno (STDIN); } cheers, --shmem -- _($_=" "x(1<<5)."?\n".q·/)Oo. G°\ / /\_¯/(q / ---------------------------- \__(m.====·.(_("always off the crowd"))."· ");sub _{s,/,($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e,e && print}
Expect uses select() and thus needs a fileno on the filehandle to work with. You should complain to the author of the tied package and request that he exports an underlying fileno (if there is one). Regards, Roland -- RGiersig@cpan.org
Subject: Re: [rt.cpan.org #29126] exp_init fails if STDIN is tied and no fileno() in its package
Date: Mon, 3 Sep 2007 13:26:16 +0200 (CEST)
To: Roland Giersig via RT <bug-Expect [...] rt.cpan.org>
From: Georg Moritz <georg.moritz [...] millenux.com>
From the keyboard of Roland Giersig via RT [03.09.07,06:50]: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=29126 > > > Expect uses select() and thus needs a fileno on the filehandle to work > with. You should complain to the author of the tied package and request > that he exports an underlying fileno (if there is one).
Right you are; a module that ties filehandles is misbehaved if it does not implement FILENO. That came to my mind right after hitting the Send button... sorry, and thanks for the quick response! --shmem Show quoted text
> Regards, Roland > -- > RGiersig@cpan.org >
-- _($_=" "x(1<<5)."?\n".q·/)Oo. G°\ / /\_¯/(q / ---------------------------- \__(m.====·.(_("always off the crowd"))."· ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}