[fpc-devel] TProcess FastCGI

Michael Van Canneyt michael at freepascal.org
Thu Mar 30 09:27:02 CEST 2006

On Wed, 29 Mar 2006, Micha Nelissen wrote:

> Hi,
> Is TProcess capable of the following ("boot" requirements for FastCGI
> process) ?
> http://fastcgi.com/devkit/doc/fcgi-spec.html#S2
> " 2.2 File descriptors
> 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.
> FCGI_LISTENSOCK_FILENO equals STDIN_FILENO. The standard descriptors
> STDOUT_FILENO and STDERR_FILENO are closed when the application begins
> execution. A reliable method for an application to determine whether it was
> invoked using CGI or FastCGI is to call getpeername
> (FCGI_LISTENSOCK_FILENO), which returns -1 with errno set to ENOTCONN for a
> FastCGI application.
> The Web server's choice of reliable transport, Unix stream pipes (AF_UNIX)
> or TCP/IP (AF_INET), is implicit in the internal state of the

No, it is not. It creates pipes for stdin/stdout, not a socket.


More information about the fpc-devel mailing list