Re: FCGI & problems

Rujith S. de Silva (
Fri, 09 Aug 1996 12:51:28 -0400

Message-Id: <>
Date: Fri, 09 Aug 1996 12:51:28 -0400
From: "Rujith S. de Silva" <>
Subject: Re: FCGI & problems

I claimed in an earlier message that I had successfully integrated
gd1.2, 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

gd writes the gifs it generates to STDOUT. 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 much simpler and a lot more efficient.  Until them, is
going to fork a process for each gif it generates - this is VERY
inefficient, and makes it hardly worthwhile to integrate with