[fpc-devel] TProcess FastCGI

Micha Nelissen micha at neli.hopto.org
Wed Mar 29 21:42:48 CEST 2006


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
FCGI_LISTENSOCK_FILENO socket. "

Micha



More information about the fpc-devel mailing list