On Fri, Jul 18, 2003 at 05:41:30PM -0400, Jesse Guardiani wrote: > Howdy list, > > Why is --enable-bannerprog not supported with FastCGI?
I did look at this briefly. IIRC, it's because sqwebmail just forks/execs the bannerprog and waits for it to terminate. The bannerprog simply sends its output straight to the stdout which it inherits from sqwebmail, which is fine for a cgi but no good in a fastcgi environment, where you have to send data in fcgi-formatted chunks back down the socket to the server. fcgi_stdio.h uses macro tricks so that 'printf' and friends are actually replaced with the relevant fastcgi calls instead - i.e. sqwebmail itself never actually writes directly to stdout. But the child process knows nothing of fastcgi. However it would be pretty easy to fix: you'd just need to open a pipe, pass the pipe to the bannerprog, then in the parent read from the pipe and write it back to fastcgi. I might do it if I get a spare few minutes. Regards, Brian.
