David Birnbaum davidb at pins.net
Tue Aug 5 20:58:54 EDT 2008


If the webserver forks the application, it leaves FD0, and STDERR, 
STDIN, and STDOUT are mutiplexed over it using the FastCGI protocol.

If it's a socket connect, it's basically the same thing - you'll to an 
accept(), and when you get the FD, use the libraries to send/receive 
data on the socked.



Thomas Grimshaw wrote:
> Since the list is working again now :)
> ===========
> Hi all,
> I'm currently in the process of expanding my webserver to support 
> FastCGI. However, i'm having a little trouble understanding one 
> crucial part of the specification.
> I may be lacking some fundamental knowledge here, so, please bear with 
> me!
> I need to create a socket in my webserver application before launching 
> the fastCGI app. So, I do this, and I have the socket handle.
> The specification reads "The Web server leaves a single file 
> descriptor, FCGI_LISTENSOCK_FILENO, open when the application begins 
> execution. This descriptor refers to a listening socket created by the 
> Web server."
> How does the FastCGI application get my socket handle?  I see from the 
> spec that FCGI_LISTENSOCK_FILENO is a constant of 0.  And a file 
> descriptor of 0 refers to STDIN, does it not? Is this a roundabout way 
> of saying that I need to use STDIN to communicate?
> I'd appreciate any help you guys can give.
> Many thanks,
> Tom
> _______________________________________________
> FastCGI-developers mailing list
> FastCGI-developers at mailman.fastcgi.com
> http://mailman.pins.net/mailman/listinfo.cgi/fastcgi-developers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.pins.net/mailman/private.cgi/fastcgi-developers/attachments/20080805/fd3f8b3a/attachment.html>

More information about the FastCGI-developers mailing list