Skip Menu |
 

This queue is for tickets about the FCGI CPAN distribution.

Report information
The Basics
Id: 75580
Status: open
Priority: 0/
Queue: FCGI

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

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



Subject: FCGI's tieing of filehandles breaks Capture::Tiny
Download (untitled) / with headers
text/plain 553b
A truncated stacktrace of the issue is available here: https://gist.github.com/443529eb62803ffce537 The docs of Capture::Tiny explain a workaround: https://metacpan.org/ module/Capture::Tiny#Modifying-filehandles-before-capturing (search the page for "FCGI") However this workaround is not acceptable, since users unaware of the issue will just get hit with an error that tells them nothing and whether or not they find this workaround is up to luck. Is there a way to fix this in FCGI or to identify it at runtime and throw an instructive error?
Download (untitled) / with headers
text/plain 359b
Some more info from the author of Capture::Tiny : xdg > mst, I suspect the tied handles don't implement or mis-implement OPEN, preventing C::T from opening handles on STDOUT/STDERR to be used for capture xdg > it may also be a fundamental limitation of tied handles. I'm not sure. xdg > but C::T's tests on "standard" tied handles work fine
Download (untitled) / with headers
text/plain 198b
FCGI::Stream uses a blessed scalar reference rather than a blessed glob reference. When OPEN calls open(), an exception is thrown. Changing the object to a blessed glob ref will fix this problem.
Download (untitled) / with headers
text/plain 553b
On Wed Mar 07 09:38:43 2012, DAGOLDEN wrote: Show quoted text
> FCGI::Stream uses a blessed scalar reference rather than a blessed glob > reference. When OPEN calls open(), an exception is thrown. Changing > the object to a blessed glob ref will fix this problem.
Clarification: changing to a blessed glob ref "fixes" the crash, but is wrong as well since "opening" the globref to something is meaningless, given that the handle returns data from FCGI, regardless. Better would be to make OPEN die with a reasonable error message that the operation is unsupported.
Download (untitled) / with headers
text/plain 906b
Vid Ons, 07 Mar 2012 kl. 20.58.45, skrev DAGOLDEN: Show quoted text
> On Wed Mar 07 09:38:43 2012, DAGOLDEN wrote:
> > FCGI::Stream uses a blessed scalar reference rather than a blessed glob > > reference. When OPEN calls open(), an exception is thrown. Changing > > the object to a blessed glob ref will fix this problem.
> > Clarification: changing to a blessed glob ref "fixes" the crash, but is > wrong as well since "opening" the globref to something is meaningless, > given that the handle returns data from FCGI, regardless. > > Better would be to make OPEN die with a reasonable error message that > the operation is unsupported.
I have fixed this in trunk[1], attempts to call open on a FCGI::Stream throws: q/Operation 'OPEN' not supported on FCGI::Stream handle/ [1] http://git.shadowcat.co.uk/gitweb/gitweb.cgi? p=catagits/fcgi2.git;a=commit;h=fd4e384a0d3ee82faf4be58384d5648d7eaeebd1 -- chansen


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.