Message-Id: <320B6C90.446B9B3D@ind70.industry.net> Date: Fri, 09 Aug 1996 12:51:28 -0400 From: "Rujith S. de Silva" <firstname.lastname@example.org> To: email@example.com Subject: Re: FCGI & GD.pm problems I claimed in an earlier message that I had successfully integrated gd1.2, GD.pm 1.00 and fcgi. In fact, I had successfully compiled the stuff so that the same perl binary could be used to generate gifs, or to execute FCGI code. However, trying to generate gifs from within FCGI code doesn't work. I'm looking at the problem - so far, this is what I think: gd writes the gifs it generates to STDOUT. GD.pm uses open(GGD,"-|"); to fork a child process that generates the gif using gd and writes it to STDOUT, and the parent process reads it in and converts it to a string. gd attempts to flush characters as they're generated. Somewhere during this process, the following error is generated: fflush returned nonzero result code. I hope this is helpful. I'm still trying to track down the problem. Sorry for my mistaken claim of success in my prior email. A suggestion: could gd be re-written or extended to return the result in a (char *) buffer, rather than writing it to FILE * stdout? This would make GD.pm much simpler and a lot more efficient. Until them, GD.pm is going to fork a process for each gif it generates - this is VERY inefficient, and makes it hardly worthwhile to integrate GD.pm with FCGI. Later, Rujith.