Skip Menu |

This queue is for tickets about the FCGI CPAN distribution.

Report information
The Basics
Id: 50972
Status: resolved
Priority: 0/
Queue: FCGI

People
Owner: Nobody in particular
Requestors: TEEJAY [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in:
  • 0.66
  • 0.67
Fixed in: (no value)



Subject: Use of FILENO on FCGI file handles causes error
when running FastCGI apps under Perl in the background with fcgi/FCGI.pm and you're using IPC::Open3, IPC::Run, IPC::Run3 or other code that calls fileno() on a FCGI filehandle the application will die with: Can't locate object method "FILENO" via package "FCGI::Stream" at /usr/local/libdata/perl5/site_perl/IPC/Run.pm line 1118. or Can't locate object method "FILENO" via package "FCGI::Stream" at /usr/local/lib/perl5/5.10.0/x86_64-linux/IO/Handle.pm line 387 IO::Handle::fileno('GLOB(0x73b6a0)') called at /usr/local/lib/perl5/site_perl/5.10.0/HTTP/Request/AsCGI.pm line 111 HTTP::Request::AsCGI::setup('HTTP::Request::AsCGI=HASH(0x1eeedf0)') called at example/vites_server_standlone_fcgi.pl line 55 main::handle_request('HTTP::Engine::Request=HASH(0x1ee7698)') called at /usr/local/lib/perl5/site_perl/5.10.0/HTTP/Engine/Role/Interface.pm line 25 eval {...} called at /usr/local/lib/perl5/site_perl/5.10.0/HTTP/Engine/Role/Interface.pm line 24 HTTP::Engine::Role::Interface::handle_request('HTTP::Engine::Interface::FCGI=HASH(0x1bb5930)', '_connection', 'HASH(0x1ee7578)') called at /usr/local/lib/perl5/site_perl/5.10.0/HTTP/Engine/Interface/FCGI.pm line 133 HTTP::Engine::Interface::FCGI::run('HTTP::Engine::Interface::FCGI=HASH(0x1bb5930)') called at /usr/local/lib/perl5/site_perl/5.10.0/Moose/Meta/Method/Delegation.pm line 99 HTTP::Engine::run('HTTP::Engine=HASH(0x1bb5a98)') called at example/vites_server_standlone_fcgi.pl line 50 Surprisingly, the FCGI.pm contains the function FILENO which is commented out - the attached patch changes that and makes the named IPC::* modules work under FastCGI.
On Fri Oct 30 10:46:26 2009, TEEJAY wrote: Show quoted text
> when running FastCGI apps under Perl in the background with > fcgi/FCGI.pm > and you're using IPC::Open3, IPC::Run, IPC::Run3 or other code that > calls fileno() on a FCGI filehandle the application will die with: > > Can't locate object method "FILENO" via package "FCGI::Stream" at > /usr/local/libdata/perl5/site_perl/IPC/Run.pm line 1118. > > or > > Can't locate object method "FILENO" via package "FCGI::Stream" at > /usr/local/lib/perl5/5.10.0/x86_64-linux/IO/Handle.pm line 387 > IO::Handle::fileno('GLOB(0x73b6a0)') called at > /usr/local/lib/perl5/site_perl/5.10.0/HTTP/Request/AsCGI.pm line 111 > > HTTP::Request::AsCGI::setup('HTTP::Request::AsCGI=HASH(0x1eeedf0)') > called at example/vites_server_standlone_fcgi.pl line 55 > main::handle_request('HTTP::Engine::Request=HASH(0x1ee7698)') > called at > /usr/local/lib/perl5/site_perl/5.10.0/HTTP/Engine/Role/Interface.pm > line 25 > eval {...} called at > /usr/local/lib/perl5/site_perl/5.10.0/HTTP/Engine/Role/Interface.pm > line 24 > >
HTTP::Engine::Role::Interface::handle_request('HTTP::Engine::Interface::FCGI=HASH(0x1bb5930)', Show quoted text
> '_connection', 'HASH(0x1ee7578)') called at > /usr/local/lib/perl5/site_perl/5.10.0/HTTP/Engine/Interface/FCGI.pm > line 133 > >
HTTP::Engine::Interface::FCGI::run('HTTP::Engine::Interface::FCGI=HASH(0x1bb5930)') Show quoted text
> called at > /usr/local/lib/perl5/site_perl/5.10.0/Moose/Meta/Method/Delegation.pm > line 99 > HTTP::Engine::run('HTTP::Engine=HASH(0x1bb5a98)') called at > example/vites_server_standlone_fcgi.pl line 50 > > Surprisingly, the FCGI.pm contains the function FILENO which is > commented out - the attached patch changes that and makes the named > IPC::* modules work under FastCGI. >
See also * http://www.mail-archive.com/ports@openbsd.org/msg16948.html * http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg687751.html
Can you please have a look and see if http://search.cpan.org/~mstrout/FCGI-0.67_01/ fixes this?
Fixed in 0.68.