Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the CGI CPAN distribution.

Report information
The Basics
Id: 94423
Status: resolved
Priority: 0/
Queue: CGI

People
Owner: Nobody in particular
Requestors: janl [...] langfeldt.net
Cc:
AdminCc:

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



Hi, Just switched a program from CGI to CGI+CGI::Fast (3.52, 1.08). The program uses RRDs::graph to generate plots. RRDs::graph has always been asked to write output to "-". This now ends in the fastcgi servers error.log. This is not so strange because: # ls -l /proc/29271/fd total 0 lrwx------ 1 www-data www-data 64 april 4 09:34 0 -> socket:[167469517] l-wx------ 1 www-data www-data 64 april 4 09:34 1 -> /var/log/apache2/error.log lr-x------ 1 www-data www-data 64 april 4 09:34 12 -> pipe:[167465616] l-wx------ 1 www-data www-data 64 april 4 09:34 15 -> pipe:[167465617] l-wx------ 1 www-data www-data 64 april 4 09:34 2 -> /var/log/apache2/error.log lrwx------ 1 www-data www-data 64 april 4 09:34 3 -> socket:[167468310] So the C code is writing to Cs STDOUT and FCGI/CGI::Fast fools with file descriptors, more than just CGI does. It would be more according to the Principle of Least Surprise if filedescriptor 1 also pointed back to the client channel. (in the mean time I'm sending the PNG files via a disk file and then sysread/syswriting it to perls STDOUT.) Regards, Nicolai
This issue has been copied to: https://github.com/leejo/CGI.pm/issues/132 please take all future correspondence there. This ticket will remain open but please do not reply here. This ticket will be closed when the github issue is dealt with.
Resolved in CGI::Fast 2.02 - please see file_handles method and perldoc.