[Catalyst] Running system commands under FastCGI with IPC::Cmd / IPC::Run

Peter Karman peter at peknet.com
Thu Oct 21 20:50:04 GMT 2010


heidi brandenburg wrote on 10/21/2010 03:02 PM:
> I've run into this problem with FCGI too. Our solution at the time, since the fileno call was in an internal API, was to skip it when STDOUT was tied. Getting an updated FCGI instead sounds like a happier thing.
> 
> I notice this in current FCGI comments:
> 
> # Some things (e.g. IPC::Run) use fileno to determine if a filehandle is open,
> # so we return a defined, but meaningless value. (-1 being the error return
> # value from the syscall in c, meaning it can never be a valid fd no)
> # Probably a better alternative would be to return the fcgi stream fd.
> sub FILENO { -1 }
> 
> 

In addition, you may want to look at SVN::Class, which does some fileno
hackery for this same reason.

http://cpansearch.perl.org/src/KARMAN/SVN-Class-0.16/lib/SVN/Class.pm

-- 
Peter Karman  .  http://peknet.com/  .  peter at peknet.com



More information about the Catalyst mailing list