Re: FCGI_LISTENSOCK_FILENO
David Birnbaum <[email protected]>
| Newsgroups | gmane.comp.web.fastcgi.devel |
|---|---|
| Message-ID | <[email protected]> |
Tom, 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. David. ------------------------------------------------------------------------ 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-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR@public.gmane.org > http://mailman.pins.net/mailman/listinfo.cgi/fastcgi-developers _______________________________________________ FastCGI-developers mailing list FastCGI-developers-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR@public.gmane.org http://mailman.pins.net/mailman/listinfo.cgi/fastcgi-developers